mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
MQTT rework v0.4, install scripts rework, Traefik docs 📦
This commit is contained in:
@@ -5,7 +5,7 @@ import conf
|
||||
import re
|
||||
from helper import timeNowTZ, get_setting, get_setting_value,resolve_device_name_dig, resolve_device_name_pholus, check_IP_format
|
||||
from logger import mylog, print_log
|
||||
from const import vendorsPath6, vendorsPath9
|
||||
from const import vendorsPath
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
@@ -343,19 +343,13 @@ def query_MAC_vendor (pMAC):
|
||||
mac_start_string9 = mac[0:9]
|
||||
|
||||
try:
|
||||
with open(vendorsPath6, 'r') as f:
|
||||
with open(vendorsPath, 'r') as f:
|
||||
for line in f:
|
||||
if line.startswith(mac_start_string6):
|
||||
vendor = line.split(' ', 1)[1].strip()
|
||||
mylog('debug', [f"[Vendor Check] Found '{vendor}' for '{pMAC}' in {vendorsPath6}"])
|
||||
mylog('debug', [f"[Vendor Check] Found '{vendor}' for '{pMAC}' in {vendorsPath}"])
|
||||
return vendor
|
||||
|
||||
with open(vendorsPath9, 'r') as f:
|
||||
for line in f:
|
||||
if line.startswith(mac_start_string9):
|
||||
vendor = line.split(' ', 1)[1].strip()
|
||||
mylog('debug', [f"[Vendor Check] Found '{vendor}' for '{pMAC}' in {vendorsPath9}"])
|
||||
return vendor
|
||||
|
||||
return -1 # MAC address not found in the database
|
||||
except FileNotFoundError:
|
||||
|
||||
Reference in New Issue
Block a user