rename is_usable_ipv4 -> is_reserved_ipv4
This commit is contained in:
4
ppf.py
4
ppf.py
@@ -107,7 +107,7 @@ def proxyfind(sqlite = None):
|
|||||||
|
|
||||||
sqlite.commit()
|
sqlite.commit()
|
||||||
|
|
||||||
def is_usable_ipv4(ip):
|
def is_reserved_ipv4(ip):
|
||||||
if ( ip.startswith("10.") or ip.startswith("192.168.") or ip.startswith("127.") or ip.startswith("0.")) or \
|
if ( ip.startswith("10.") or ip.startswith("192.168.") or ip.startswith("127.") or ip.startswith("0.")) or \
|
||||||
(ip.startswith("172.") and (int(ip.split(".")[1]) >= 16 and int(ip.split(".")[1]) <= 31)): return True
|
(ip.startswith("172.") and (int(ip.split(".")[1]) >= 16 and int(ip.split(".")[1]) <= 31)): return True
|
||||||
return False
|
return False
|
||||||
@@ -123,7 +123,7 @@ def proxyleech(sqlite, rows):
|
|||||||
for p in sorted(re.findall(r'[0-9]+(?:\.[0-9]+){3}:[0-9]+', cleanhtml(content))):
|
for p in sorted(re.findall(r'[0-9]+(?:\.[0-9]+){3}:[0-9]+', cleanhtml(content))):
|
||||||
if p in uniques: continue
|
if p in uniques: continue
|
||||||
try:
|
try:
|
||||||
if not is_usable_ipv4(p.split(':')[0]): uniques.append(p)
|
if not is_reserved_ipv4(p.split(':')[0]): uniques.append(p)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user