Allow zeros when detecting IPv4 address (e.g. 192.168.0.1)
This commit is contained in:
parent
2910ecb8e3
commit
76e73c9a2f
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user