Vendors update work #618 ⏬
This commit is contained in:
@@ -38,7 +38,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
|
|||||||
|
|
||||||
RUN apk update --no-cache \
|
RUN apk update --no-cache \
|
||||||
&& apk add --no-cache bash zip lsblk gettext-envsubst sudo mtr tzdata s6-overlay \
|
&& apk add --no-cache bash zip lsblk gettext-envsubst sudo mtr tzdata s6-overlay \
|
||||||
&& apk add --no-cache curl arp-scan iproute2 iproute2-ss nmap nmap-scripts traceroute net-tools net-snmp-tools bind-tools awake ca-certificates \
|
&& apk add --no-cache curl arp-scan iproute2 iproute2-ss nmap nmap-scripts traceroute net-tools net-snmp-tools bind-tools awake ca-certificates \
|
||||||
&& apk add --no-cache sqlite php82 php82-fpm php82-cgi php82-curl php82-sqlite3 php82-session \
|
&& apk add --no-cache sqlite php82 php82-fpm php82-cgi php82-curl php82-sqlite3 php82-session \
|
||||||
&& apk add --no-cache python3 nginx \
|
&& apk add --no-cache python3 nginx \
|
||||||
&& ln -s /usr/bin/awake /usr/bin/wakeonlan \
|
&& ln -s /usr/bin/awake /usr/bin/wakeonlan \
|
||||||
|
|||||||
@@ -12,56 +12,31 @@
|
|||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
# Main directories to update:
|
# Main directories to update:
|
||||||
# /usr/share/arp-scan
|
# /usr/share/arp-scan
|
||||||
# /usr/share/ieee-data
|
|
||||||
# /var/lib/ieee-data
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
echo "---------------------------------------------------------"
|
echo "---------------------------------------------------------"
|
||||||
echo "[INSTALL] Run update_vendors.sh"
|
echo "[INSTALL] Run update_vendors.sh"
|
||||||
echo "---------------------------------------------------------"
|
echo "---------------------------------------------------------"
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
DL_DIR=/usr/share/arp-scan
|
||||||
echo Updating... /usr/share/ieee-data/
|
|
||||||
cd /usr/share/ieee-data/ || { echo "could not enter /usr/share/ieee-data directory"; exit 1; }
|
|
||||||
|
|
||||||
sudo mkdir -p 2_backup
|
|
||||||
sudo cp -- *.txt 2_backup
|
|
||||||
sudo cp -- *.csv 2_backup
|
|
||||||
echo ""
|
|
||||||
echo Download Start
|
|
||||||
echo ""
|
|
||||||
sudo curl "$1" -LO https://standards-oui.ieee.org/oui28/mam.csv \
|
|
||||||
-LO https://standards-oui.ieee.org/oui28/mam.csv \
|
|
||||||
-LO https://standards-oui.ieee.org/oui28/mam.txt \
|
|
||||||
-LO https://standards-oui.ieee.org/oui36/oui36.csv \
|
|
||||||
-LO https://standards-oui.ieee.org/oui36/oui36.txt \
|
|
||||||
-LO https://standards-oui.ieee.org/oui/oui.csv \
|
|
||||||
-LO https://standards-oui.ieee.org/oui/oui.txt
|
|
||||||
echo ""
|
|
||||||
echo Download Finished
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
echo ""
|
echo Updating... $DL_DIR
|
||||||
echo Updating... /usr/share/arp-scan/
|
cd $DL_DIR || { echo "could not enter $DL_DIR directory"; exit 1; }
|
||||||
cd /usr/share/arp-scan || { echo "could not enter /usr/share/arp-scan directory"; exit 1; }
|
|
||||||
|
|
||||||
sudo mkdir -p 2_backup
|
# Define the URL of the IEEE OUI file
|
||||||
sudo cp -- *.txt 2_backup
|
IEEE_OUI_URL="http://standards-oui.ieee.org/oui/oui.txt"
|
||||||
|
|
||||||
# Update from /usb/lib/ieee-data
|
# Download the file using wget
|
||||||
sudo get-iab -v
|
wget "$IEEE_OUI_URL" -O ieee-oui_dl.txt
|
||||||
sudo get-oui -v
|
|
||||||
|
|
||||||
# make files readable
|
# Filter lines containing "(base 16)" and remove the "(base 16)" string
|
||||||
sudo chmod +r /usr/share/arp-scan/ieee-oui.txt
|
grep "(base 16)" ieee-oui_dl.txt | sed 's/ *(base 16)//' > ieee-oui_new.txt
|
||||||
|
|
||||||
# Update from ieee website
|
# Combine ieee-oui_new.txt and ieee-oui.txt, and extract unique MAC start values along with vendor names
|
||||||
# sudo get-iab -v -u http://standards-oui.ieee.org/iab/iab.txt
|
|
||||||
# sudo get-oui -v -u http://standards-oui.ieee.org/oui/oui.txt
|
|
||||||
|
|
||||||
# Update from ieee website develop
|
cat ieee-oui.txt ieee-oui_new.txt >> ieee-oui_all.txt
|
||||||
# sudo get-iab -v -u http://standards.ieee.org/develop/regauth/iab/iab.txt
|
sort ieee-oui_all.txt > ieee-oui_all_sort.txt
|
||||||
# sudo get-oui -v -u http://standards.ieee.org/develop/regauth/oui/oui.txt
|
awk '{$1=$1; print}' ieee-oui_all_sort.txt | sort -u > ieee-oui_all_filtered.txt
|
||||||
|
|
||||||
# Update from Sanitized oui (linuxnet.ca)
|
|
||||||
# sudo get-oui -v -u https://linuxnet.ca/ieee/oui.txt
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ apiPath = applicationPath + '/front/api/'
|
|||||||
reportTemplatesPath = applicationPath + '/front/report_templates/'
|
reportTemplatesPath = applicationPath + '/front/report_templates/'
|
||||||
fullConfPath = applicationPath + confPath
|
fullConfPath = applicationPath + confPath
|
||||||
fullDbPath = applicationPath + dbPath
|
fullDbPath = applicationPath + dbPath
|
||||||
vendorsPath = '/usr/share/arp-scan/ieee-oui.txt'
|
vendorsPath = '/usr/share/arp-scan/ieee-oui_all_filtered.txt'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user