Master #1
@@ -86,15 +86,11 @@ class EnhancedScanService:
|
||||
# 1️⃣ 优先使用本地 OUI 数据库(免网络、高性能)
|
||||
db = _get_oui_db()
|
||||
if db:
|
||||
# 精确匹配 AA:BB:CC
|
||||
vendor = db.get(oui)
|
||||
# 数据库 key 是 AABBCC 格式(无冒号)
|
||||
oui_key = oui.replace(':', '')
|
||||
vendor = db.get(oui_key)
|
||||
if vendor:
|
||||
return vendor
|
||||
# 去掉冒号的格式匹配 AABBCC
|
||||
oui_no_colon = oui.replace(':', '')
|
||||
for prefix, v in db.items():
|
||||
if prefix == oui_no_colon:
|
||||
return v
|
||||
|
||||
# 2️⃣ 回退:mac_vendor_lookup 在线库
|
||||
if MAC_LOOKUP_AVAILABLE:
|
||||
|
||||
Reference in New Issue
Block a user