mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
27 lines
1.1 KiB
Bash
Executable File
27 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# NetAlertX
|
|
# Open Source Network Guard / WIFI & LAN intrusion detector
|
|
#
|
|
# update_vendors.sh - Back module. IEEE Vendors db update
|
|
# ------------------------------------------------------------------------------
|
|
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# ----------------------------------------------------------------------
|
|
# Main directories to update:
|
|
# /usr/share/arp-scan
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Download the file using wget to stdout and process it
|
|
wget -q "http://standards-oui.ieee.org/oui/oui.txt" -O /dev/stdout | \
|
|
sed -E 's/ *\(base 16\)//' | \
|
|
awk -F' ' '{printf "%s\t%s\n", $1, substr($0, index($0, $2))}' | \
|
|
sort | \
|
|
awk '{$1=$1; print}' | \
|
|
sort -u | \
|
|
awk -F' ' '{printf "%s\t%s\n", $1, substr($0, index($0, $2))}' \
|
|
> /services/run/tmp/ieee-oui.txt
|
|
|