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

Method establishHFPConnection

src/modules/ble/HFP_Exploit.cpp:60–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60bool 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
80bool HFPExploitEngine::executeHFPAttackChain(NimBLEAddress target) {
81 if (!testCVE202536911(target)) {

Callers 4

injectDuckyScriptMethod · 0.80
showHFPSubMenuFunction · 0.80
runHFPHIDPivotAttackFunction · 0.80

Calls 2

showAttackProgressFunction · 0.85
connectMethod · 0.45

Tested by

no test coverage detected