From e318b651bb86bc86efcc764f7964f3263717ca28 Mon Sep 17 00:00:00 2001 From: Seb3thehacker Date: Mon, 5 Oct 2026 17:43:09 -0700 Subject: [PATCH] leave the car's Bluetooth address out of logs --- .../main/java/app/seb3thehacker/gearslip/GearslipRunner.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gearslip/src/main/java/app/seb3thehacker/gearslip/GearslipRunner.kt b/gearslip/src/main/java/app/seb3thehacker/gearslip/GearslipRunner.kt index b030191..9dbb6aa 100644 --- a/gearslip/src/main/java/app/seb3thehacker/gearslip/GearslipRunner.kt +++ b/gearslip/src/main/java/app/seb3thehacker/gearslip/GearslipRunner.kt @@ -352,8 +352,11 @@ class GearslipRunner( private fun onServiceDiscoveryResponse(body: ByteArray) { log.i("<- ServiceDiscoveryResponse (${body.size} bytes, decrypted successfully)") - // Field 5 is the car's serial number. Logs get shared, so it stays out of them. - val described = Protobuf.describe(body).replace(Regex("(?m)^ #5 string = .*$"), " #5 string = (car serial, left out)") + // Field 5 is the car's serial number, and the Bluetooth service carries the car's + // Bluetooth address. Either one identifies the car, and logs get shared, so both stay out. + val described = Protobuf.describe(body) + .replace(Regex("(?m)^ #5 string = .*$"), " #5 string = (car serial, left out)") + .replace(Regex("([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}"), "(Bluetooth address, left out)") log.i("head unit describes itself as:\n" + described) log.verdict( "VIABLE",