Update passive_sniff.py
This commit is contained in:
parent
5db74fb495
commit
c0261964ae
1 changed files with 0 additions and 2 deletions
|
|
@ -95,7 +95,6 @@ def get_mac_vendor(mac, ip):
|
|||
|
||||
print(f"[+] New Device: {ip} ({mac}) -> Vendor: {vendor}")
|
||||
|
||||
# FIX: Guard against race condition — devices[mac] may not exist if called unexpectedly
|
||||
device = devices.get(mac)
|
||||
hostname = device.get('hostname', '') if device else ''
|
||||
log_device(mac, ip, vendor, hostname)
|
||||
|
|
@ -130,7 +129,6 @@ def process_packet(packet):
|
|||
hostname = opt[1].decode('utf-8')
|
||||
if mac in devices:
|
||||
devices[mac]['hostname'] = hostname
|
||||
# FIX: Use consistent "Unknown" fallback (was "Bilinmiyor" in Turkish)
|
||||
log_device(mac, devices[mac]['ip'], mac_vendors.get(mac[:8].upper(), "Unknown"), hostname)
|
||||
print(f"[*] Device Name: {mac} -> {hostname}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue