From 9ecebffbf501756aa67e407d18ebd01668055b36 Mon Sep 17 00:00:00 2001 From: CyberRoute Date: Mon, 23 Sep 2024 16:50:58 +0200 Subject: [PATCH] fixing buggy gpt code :D --- core/arp_scanner.py | 2 +- core/vendor.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/arp_scanner.py b/core/arp_scanner.py index fd8fdd5..2c4f9f7 100644 --- a/core/arp_scanner.py +++ b/core/arp_scanner.py @@ -275,7 +275,7 @@ class ARPScannerThread(QThread): progress_updated = pyqtSignal(int) verbose_output = pyqtSignal(str) # Signal to emit verbose output - def __init__(self, interface, mac_vendor_lookup, timeout=5): + def __init__(self, interface, mac_vendor_lookup, timeout=1): super().__init__() self.interface = interface self.mac_vendor_lookup = mac_vendor_lookup diff --git a/core/vendor.py b/core/vendor.py index 0ced21d..3bd9fe8 100644 --- a/core/vendor.py +++ b/core/vendor.py @@ -75,7 +75,7 @@ def _load_from_url(cls, url): dict: A dictionary mapping OUI (first 6 characters of MAC address) to vendor names. If the request fails, returns an empty dictionary. """ - response = requests.get(url, timeout=5) + response = requests.get(url, timeout=1) if response.status_code == 200: csv_data = StringIO(response.text) csvreader = csv.reader(csv_data) @@ -102,7 +102,6 @@ def _save_to_file(cls, filename, data): """ with open(filename, 'w', encoding='utf-8') as file: writer = csv.writer(file) - writer.writerow(["Organizationally Unique Identifier", "Organization Name"]) for oui, vendor in data.items(): writer.writerow([oui, vendor])