| 1446 | } |
| 1447 | |
| 1448 | bool AudioAttackService::executeAudioAttack(NimBLEAddress target) { |
| 1449 | AutoCleanup cleanup([]() { BLEStateManager::deinitBLE(true); }); |
| 1450 | |
| 1451 | String connectionMethod = ""; |
| 1452 | NimBLEClient *pClient = attemptConnectionWithStrategies(target, connectionMethod); |
| 1453 | if (!pClient) return false; |
| 1454 | |
| 1455 | BLEStateManager::registerClient(pClient); |
| 1456 | bool success = findAndAttackAudioServices(pClient); |
| 1457 | |
| 1458 | pClient->disconnect(); |
| 1459 | BLEStateManager::unregisterClient(pClient); |
| 1460 | NimBLEDevice::deleteClient(pClient); |
| 1461 | cleanup.disable(); |
| 1462 | delay(300); |
| 1463 | return success; |
| 1464 | } |
| 1465 | |
| 1466 | bool AudioAttackService::injectMediaCommands(NimBLEAddress target) { return executeAudioAttack(target); } |
| 1467 |
no test coverage detected