diff --git a/core/arp_scanner.py b/core/arp_scanner.py index 589af36..a945a58 100644 --- a/core/arp_scanner.py +++ b/core/arp_scanner.py @@ -1,3 +1,6 @@ +""" +Arp Scanner +""" import io import sys from PySide6.QtWidgets import * @@ -41,9 +44,6 @@ def __init__(self, packet_collector): @Slot() def run(self): - """ - Your code goes in this function - """ print("Sniffer Thread start") self.packet_collector.start_capture() print("Sniffer Thread complete") @@ -148,7 +148,12 @@ def open_device_details(self, item): self.hostname = parts[2] self.vendor = " ".join(parts[3:]) - self.device_details_window = DeviceDetailsWindow(self.ip_address, self.mac, self.hostname, self.vendor) + self.device_details_window = DeviceDetailsWindow( + self.ip_address, + self.mac, + self.hostname, + self.vendor + ) self.device_details_window.show() else: print("Invalid format: Not enough information") @@ -298,4 +303,3 @@ def run(self): # progress = int((i + 1) / len(arp_packets) * 100) # self.progress_updated.emit(progress) self.finished.emit(arp_results) - diff --git a/main.py b/main.py index 1a28388..e1b5b3a 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,14 @@ -from PySide6.QtWidgets import QApplication +""" +This script launches a GUI application for ARP sniffing. + +It uses PySide6 for the graphical user interface (GUI) and argparse to handle +command-line arguments. The application initializes a device discovery window +that displays ARP scanning results for a given network interface. +""" + import argparse import sys +from PySide6.QtWidgets import QApplication # pylint: disable=E0611 from core.arp_scanner import DeviceDiscoveryDialog if __name__ == "__main__": @@ -10,9 +18,10 @@ app = QApplication(sys.argv) - window = DeviceDiscoveryDialog(args.interface, oui_url="http://standards-oui.ieee.org/oui/oui.csv") + window = DeviceDiscoveryDialog( + args.interface, + oui_url="http://standards-oui.ieee.org/oui/oui.csv" + ) window.show() sys.exit(app.exec()) - -