From 84c996e929cb1813f05857a3ef3dfd5081120949 Mon Sep 17 00:00:00 2001 From: Guillaume Dardelet Date: Tue, 17 Jan 2017 11:39:07 +0100 Subject: [PATCH] [Fix] Skip APIPA network --- scan.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scan.py b/scan.py index ef3f5c9..48297af 100644 --- a/scan.py +++ b/scan.py @@ -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) \ No newline at end of file + return scan_and_print_neighbors(net, interface)