[Fix] Skip APIPA network

This commit is contained in:
Guillaume Dardelet 2017-01-17 11:39:07 +01:00
parent 2aa39a3f26
commit 84c996e929
1 changed files with 6 additions and 1 deletions

View File

@ -54,6 +54,11 @@ def scanNetwork():
if netmask <= 0 or netmask == 0xFFFFFFFF:
continue
# Skip APIPA network (corresponds to the 169.254.0.0/16 adress range)
# See https://fr.wikipedia.org/wiki/Automatic_Private_Internet_Protocol_Addressing for more details
if network == 2851995648:
continue
net = to_CIDR_notation(network, netmask)
if interface != scapy.config.conf.iface:
@ -61,4 +66,4 @@ def scanNetwork():
continue
if net:
return scan_and_print_neighbors(net, interface)
return scan_and_print_neighbors(net, interface)