diff --git a/pwnagotchi/plugins/default/bt-tether.py b/pwnagotchi/plugins/default/bt-tether.py index 8a1dffba..a9d002e2 100644 --- a/pwnagotchi/plugins/default/bt-tether.py +++ b/pwnagotchi/plugins/default/bt-tether.py @@ -79,4 +79,10 @@ class BTTether(plugins.Plugin): def on_unload(self, ui): with ui._lock: - ui.remove_element('bluetooth') \ No newline at end of file + ui.remove_element('bluetooth') + try: + mac = self.options['mac'] + subprocess.run(['nmcli', 'device', 'disconnect', f'{mac}'], check=True) + logging.info(f"[BT-Tether] Disconnected from device with MAC: {mac}") + except Exception as e: + logging.error(f"[BT-Tether] Failed to disconnect from device: {e}") \ No newline at end of file