Vendors update work v0.1 #618 ⏬
This commit is contained in:
@@ -17,7 +17,8 @@ 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_all_filtered.txt'
|
vendorsPath = '/usr/share/arp-scan/ieee-oui.txt'
|
||||||
|
vendorsPathNewest = '/usr/share/arp-scan/ieee-oui_all_filtered.txt'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,11 @@
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
import conf
|
import conf
|
||||||
|
import os
|
||||||
import re
|
import re
|
||||||
from helper import timeNowTZ, get_setting, get_setting_value, list_to_where, resolve_device_name_dig, resolve_device_name_pholus, get_device_name_nslookup, check_IP_format
|
from helper import timeNowTZ, get_setting, get_setting_value, list_to_where, resolve_device_name_dig, resolve_device_name_pholus, get_device_name_nslookup, check_IP_format
|
||||||
from logger import mylog, print_log
|
from logger import mylog, print_log
|
||||||
from const import vendorsPath
|
from const import vendorsPath, vendorsPathNewest
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Device object handling (WIP)
|
# Device object handling (WIP)
|
||||||
@@ -405,6 +406,11 @@ def query_MAC_vendor (pMAC):
|
|||||||
|
|
||||||
pMACstr = str(pMAC)
|
pMACstr = str(pMAC)
|
||||||
|
|
||||||
|
filePath = vendorsPath
|
||||||
|
|
||||||
|
if os.path.isfile(vendorsPathNewest):
|
||||||
|
filePath = vendorsPathNewest
|
||||||
|
|
||||||
# Check MAC parameter
|
# Check MAC parameter
|
||||||
mac = pMACstr.replace (':','').lower()
|
mac = pMACstr.replace (':','').lower()
|
||||||
if len(pMACstr) != 17 or len(mac) != 12 :
|
if len(pMACstr) != 17 or len(mac) != 12 :
|
||||||
|
|||||||
Reference in New Issue
Block a user