Skip to content

Commit

Permalink
ipforwarding not necessary for now. scan button enable one shot
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberRoute committed Oct 4, 2024
1 parent daab932 commit 84ca48e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/arp_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 84ca48e

Please sign in to comment.