Bugfix: quote dot in topsequence awk regex generation

This commit is contained in:
ValdikSS 2023-06-11 16:07:16 +03:00
parent c73e0d901f
commit aa29beda04

View File

@ -47,7 +47,7 @@ finallist = list(patternhit)[-1 * len(wordreplace):]
with open(sys.argv[2], "w") as awkfile: with open(sys.argv[2], "w") as awkfile:
print("{", file=awkfile) print("{", file=awkfile)
for i, w in enumerate(finallist): for i, w in enumerate(finallist):
print('gsub(/{}/, "{}", domainname)'.format(w, wordreplace[i]), file=awkfile) print('gsub(/{}/, "{}", domainname)'.format(w.replace(".", "\\."), wordreplace[i]), file=awkfile)
print("}", file=awkfile) print("}", file=awkfile)
with open(sys.argv[3], "w") as pacfile: with open(sys.argv[3], "w") as pacfile: