From 5d2bebae28bb26d3ed9a02f4531d822d293848b3 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Wed, 11 Jan 2017 14:46:10 +0100 Subject: [PATCH] Add IPv4 multicast range to ignored addresses --- src/helper_generic.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/helper_generic.py b/src/helper_generic.py index a36c273e..9e2eb9ba 100644 --- a/src/helper_generic.py +++ b/src/helper_generic.py @@ -67,7 +67,7 @@ def isHostInPrivateIPRange(host): if (ord(hostAddr[0]) & 0xfe) == 0xfc: return False pass - else: + elif ".onion" not in host: if host[:3] == '10.': return True if host[:4] == '172.': @@ -76,6 +76,9 @@ def isHostInPrivateIPRange(host): return True if host[:8] == '192.168.': return True + # Multicast + if host[:3] >= 224 and host[:3] <= 239 and host[4] == '.': + return True return False def addDataPadding(data, desiredMsgLength = 12, paddingChar = '\x00'):