mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-06 17:15:38 -08:00
(Unknown) vendor not updated #889
This commit is contained in:
@@ -30,13 +30,12 @@ IEEE_OUI_URL="http://standards-oui.ieee.org/oui/oui.txt"
|
|||||||
# Download the file using wget
|
# Download the file using wget
|
||||||
wget "$IEEE_OUI_URL" -O ieee-oui_dl.txt
|
wget "$IEEE_OUI_URL" -O ieee-oui_dl.txt
|
||||||
|
|
||||||
# Filter lines containing "(base 16)" and remove the "(base 16)" string
|
# Filter lines containing "(base 16)" and format them with a tab between MAC and vendor
|
||||||
grep "(base 16)" ieee-oui_dl.txt | sed 's/ *(base 16)//' > ieee-oui_new.txt
|
grep "(base 16)" ieee-oui_dl.txt | sed -E 's/ *\(base 16\)//' | awk -F' ' '{printf "%s\t%s\n", $1, substr($0, index($0, $2))}' > ieee-oui_new.txt
|
||||||
|
|
||||||
# Combine ieee-oui_new.txt and ieee-oui.txt, and extract unique MAC start values along with vendor names
|
|
||||||
|
|
||||||
|
# Combine, sort, and remove duplicates, ensuring tab-separated output
|
||||||
cat ieee-oui.txt ieee-oui_new.txt >> ieee-oui_all.txt
|
cat ieee-oui.txt ieee-oui_new.txt >> ieee-oui_all.txt
|
||||||
sort ieee-oui_all.txt > ieee-oui_all_sort.txt
|
sort ieee-oui_all.txt | awk '{$1=$1; print}' | sort -u | awk -F' ' '{printf "%s\t%s\n", $1, substr($0, index($0, $2))}' > ieee-oui_all_filtered.txt
|
||||||
awk '{$1=$1; print}' ieee-oui_all_sort.txt | sort -u > ieee-oui_all_filtered.txt
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -634,7 +634,7 @@ def query_MAC_vendor (pMAC):
|
|||||||
for line in f:
|
for line in f:
|
||||||
line_lower = line.lower() # Convert line to lowercase for case-insensitive matching
|
line_lower = line.lower() # Convert line to lowercase for case-insensitive matching
|
||||||
if line_lower.startswith(mac_start_string6):
|
if line_lower.startswith(mac_start_string6):
|
||||||
parts = line.split(' ', 1)
|
parts = line.split('\t', 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}"])
|
||||||
|
|||||||
Reference in New Issue
Block a user