From 84ca48e1184fd5e0637ac0589539756970d33c39 Mon Sep 17 00:00:00 2001 From: Alessandro Bresciani Date: Fri, 4 Oct 2024 16:12:21 +0200 Subject: [PATCH] ipforwarding not necessary for now. scan button enable one shot --- core/arp_scanner.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/arp_scanner.py b/core/arp_scanner.py index 04d00e0..289da61 100644 --- a/core/arp_scanner.py +++ b/core/arp_scanner.py @@ -67,8 +67,8 @@ def setup_ui_elements(self): """Sets up the UI elements and connections.""" self.setWindowIcon(QIcon("images/phantom_logo.png")) - self._ui.scan.clicked.connect(self.toggle_scan) - net.enable_ip_forwarding() + self._ui.scan.clicked.connect(self.start_scan) + #net.enable_ip_forwarding() self._ui.quit.clicked.connect(self.quit_application) # Add static labels and list widgets @@ -212,12 +212,12 @@ def add_packet_if_new(self, packet_label): def quit_application(self): """Quit the application.""" self._ui.quit.setEnabled(False) - net.disable_ip_forwarding() + #net.disable_ip_forwarding() # Stop any running threads safely if self.arp_scanner_thread is not None: - self.arp_scanner_thread.terminate() + self.arp_scanner_thread.quit() self.arp_scanner_thread.wait() - QTimer.singleShot(2000, self.close) + self.close() class ARPScannerThread(QThread): # pylint: disable=too-few-public-methods