Add IPv4 multicast range to ignored addresses
This commit is contained in:
parent
8bcfe80ad0
commit
5d2bebae28
|
@ -67,7 +67,7 @@ def isHostInPrivateIPRange(host):
|
||||||
if (ord(hostAddr[0]) & 0xfe) == 0xfc:
|
if (ord(hostAddr[0]) & 0xfe) == 0xfc:
|
||||||
return False
|
return False
|
||||||
pass
|
pass
|
||||||
else:
|
elif ".onion" not in host:
|
||||||
if host[:3] == '10.':
|
if host[:3] == '10.':
|
||||||
return True
|
return True
|
||||||
if host[:4] == '172.':
|
if host[:4] == '172.':
|
||||||
|
@ -76,6 +76,9 @@ def isHostInPrivateIPRange(host):
|
||||||
return True
|
return True
|
||||||
if host[:8] == '192.168.':
|
if host[:8] == '192.168.':
|
||||||
return True
|
return True
|
||||||
|
# Multicast
|
||||||
|
if host[:3] >= 224 and host[:3] <= 239 and host[4] == '.':
|
||||||
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def addDataPadding(data, desiredMsgLength = 12, paddingChar = '\x00'):
|
def addDataPadding(data, desiredMsgLength = 12, paddingChar = '\x00'):
|
||||||
|
|
Reference in New Issue
Block a user