From 97416017c4e9d4609193c0d67c909d75c5af1ec2 Mon Sep 17 00:00:00 2001 From: mickael Date: Fri, 4 Jan 2019 22:52:45 +0000 Subject: [PATCH] rename is_usable_ipv4 -> is_reserved_ipv4 --- ppf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ppf.py b/ppf.py index d5c72a4..c956c72 100755 --- a/ppf.py +++ b/ppf.py @@ -107,7 +107,7 @@ def proxyfind(sqlite = None): 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 \ (ip.startswith("172.") and (int(ip.split(".")[1]) >= 16 and int(ip.split(".")[1]) <= 31)): return True 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))): if p in uniques: continue try: - if not is_usable_ipv4(p.split(':')[0]): uniques.append(p) + if not is_reserved_ipv4(p.split(':')[0]): uniques.append(p) except: pass