mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
update_vendors work #533 🔃
This commit is contained in:
@@ -365,13 +365,15 @@ def query_MAC_vendor (pMAC):
|
|||||||
try:
|
try:
|
||||||
with open(vendorsPath, 'r') as f:
|
with open(vendorsPath, 'r') as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
if line.startswith(mac_start_string6):
|
if line.startswith(mac_start_string6):
|
||||||
mylog('debug', [f"[Vendor Check] Macth found, line to process: {line}"])
|
|
||||||
parts = line.split(' ', 1)
|
parts = line.split(' ', 1)
|
||||||
if len(parts) > 1:
|
if len(parts) > 1:
|
||||||
vendor = parts[1].strip()
|
vendor = parts[1].strip()
|
||||||
mylog('debug', [f"[Vendor Check] Found '{vendor}' for '{pMAC}' in {vendorsPath}"])
|
mylog('debug', [f"[Vendor Check] Found '{vendor}' for '{pMAC}' in {vendorsPath}"])
|
||||||
return vendor
|
return vendor
|
||||||
|
else:
|
||||||
|
mylog('debug', [f'[Vendor Check] ⚠ ERROR: Match found, but line could not be processed: "{line}"'])
|
||||||
|
return -1
|
||||||
|
|
||||||
|
|
||||||
return -1 # MAC address not found in the database
|
return -1 # MAC address not found in the database
|
||||||
|
|||||||
Reference in New Issue
Block a user