From 39059653d60bcbf3c1eaa6d0d425f35a24439c6c Mon Sep 17 00:00:00 2001 From: minoplhy Date: Sat, 2 Oct 2021 15:24:31 +0700 Subject: [PATCH] support square Brackets IPV6 --- crawler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/crawler.py b/crawler.py index ff6debe..8c216e3 100644 --- a/crawler.py +++ b/crawler.py @@ -48,6 +48,7 @@ def IP_URL_FILTERING(filters_welcome): file[i] = re.sub('/..+\Z', '', file[i]) file[i] = re.sub(':(\d\d\d\d\d|\d\d\d\d|\d\d\d|\d\d|\d)', '', file[i]) file[i] = re.sub('(\d|\d\d|\d\d\d)\.(\d|\d\d|\d\d\d)\.(\d|\d\d|\d\d\d)\.(\d|\d\d|\d\d\d)\Z', '', file[i]) + file[i] = re.sub('\[..*\]', '', file[i]) with open(filters_welcome, 'w') as f1: f1.writelines(["%s\n" % item for item in file]) print("Ip Address and Url Path filtering Operation Completed!")