support square Brackets IPV6

This commit is contained in:
minoplhy 2021-10-02 15:24:31 +07:00
parent bab3568a42
commit 39059653d6

View File

@ -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!")