Skip to content

Commit d633f73

Browse files
committed
Fix IP pattern
1 parent 9c8752c commit d633f73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ipexdbl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def download_file(url):
1717
return None
1818

1919
def extract_ips(text):
20-
ip_pattern = r'(?:(?:\d{1,3}\.){3}\d{1,3})(?:/(?!1\b)(?:[0-9]|[12][0-9]|3[0-2]))?'
20+
ip_pattern = r'(?:\d{1,3}\.){3}\d{1,3}(?:/(?:0|[2-9]|[12][0-9]|3[0-2]))?'
2121
return re.findall(ip_pattern, text)
2222

2323
def read_existing_ips(filename):

0 commit comments

Comments
 (0)