Skip to content

Commit

Permalink
addressing some of the issues with pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberRoute committed Sep 20, 2024
1 parent 2aa5328 commit 7f819d9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
14 changes: 9 additions & 5 deletions core/arp_scanner.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""
Arp Scanner
"""
import io
import sys
from PySide6.QtWidgets import *
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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)

17 changes: 13 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
@@ -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__":
Expand All @@ -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())


0 comments on commit 7f819d9

Please sign in to comment.