Allow zeros when detecting IPv4 address (e.g. 192.168.0.1)
This commit is contained in:
@@ -369,7 +369,7 @@ def is_ipv4(instr):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
toks = [x for x in toks if (int(x) < 256 and int(x) > 0)]
|
toks = [x for x in toks if (int(x) < 256 and int(x) >= 0)]
|
||||||
except:
|
except:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user