1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| # 定义匹配的正则表达式和分类标签 含重复的正则 pattern_groups = { "PagePath Matches": [ (re.compile(r'[Pp][Aa][Gg][Ee][Pp][Aa][Tt][Hh]:\s*"(.*?)"'), "pagePath_double_quotes"), (re.compile(r"[Pp][Aa][Gg][Ee][Pp][Aa][Tt][Hh]:\s*'(.*?)'"), "pagePath_double_quotes"), ], "Path Matches": [ (re.compile(r'[Pp][Aa][Tt][Hh]:\s*"(.*?)"'), "path_double_quotes"), (re.compile(r"[Pp][Aa][Tt][Hh]:\s*'(.*?)'"), "path_double_quotes"), (re.compile(r'[Uu][Rr][Ll]:\s*"([^"]+)"'), "path_double_quotes"), (re.compile(r'[Uu][Rr][Ll]: "([^"]+)'), "path_double_quotes"), ], "GET Matches": [ (re.compile(r'[Gg][Ee][Tt]\([^()]*?"([^"]*?)"[^()]*?\)'), ""), (re.compile(r"[Gg][Ee][Tt]\([^()]*?['\"]([^'\"]*?)['\"][^()]*?\)"), ""), (re.compile(r'[Gg][Ee][Tt]\(\s*["\']([^"\']+)["\']\s*,'), ""), ], "POST Matches": [ (re.compile(r'[Pp][Oo][Ss][Tt]\([^()]*?"([^"]*?)"[^()]*?\)'), ""), (re.compile(r"[Pp][Oo][Ss][Tt]\([^()]*?['\"]([^'\"]*?)['\"][^()]*?\)"), ""), (re.compile(r'[Pp][Oo][Ss][Tt]\(\s*["\']([^"\']+)["\']\s*,'), ""), ] }
|