Set bettercap "ble.recon off"

Signed-off-by: Frédéric <fmatray@users.noreply.github.com>
This commit is contained in:
Frédéric
2025-02-10 19:34:19 +01:00
committed by GitHub
parent 2893632ee5
commit 81d377f491

View File

@ -125,7 +125,7 @@ DNS_PTTRN = r"^\s*((\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s*[ ,;]\s*)+((\d{1,3}\.\
class BTTether(plugins.Plugin):
__author__ = "Jayofelony, modified my fmatray"
__version__ = "1.3"
__version__ = "1.4"
__license__ = "GPL3"
__description__ = "A new BT-Tether plugin"
@ -213,6 +213,13 @@ class BTTether(plugins.Plugin):
f"[BT-Tether] Failed to connect to device: have you enabled bluetooth tethering on your phone?"
)
def on_ready(self, agent):
try:
logging.info(f"[BT-Tether] Disabling bettercap's BLE module")
agent.run("ble.recon off", verbose_errors=False)
except Exception as e:
logging.info(f"[BT-Tether] Bettercap BLE was already off.")
def on_unload(self, ui):
with ui._lock:
ui.remove_element("bluetooth")