diff --git a/dist/index.js b/dist/index.js index 1666f2c..77bcad7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4152,7 +4152,7 @@ class Interceptor: def wildcard_to_regex(self, wildcard_domain): regex_pattern = re.escape(wildcard_domain) # Escape special characters - regex_pattern = regex_pattern.replace(r'\*', '.*') # Replace wildcard with regex equivalent + regex_pattern = regex_pattern.replace(r'\\*', '.*') # Replace wildcard with regex equivalent regex_pattern = '^' + regex_pattern + '$' # Ensure the pattern matches the entire string return re.compile(regex_pattern) @@ -4280,6 +4280,8 @@ addons = [Interceptor()] # pylint: disable=invalid-name fs.writeFileSync('intercept.py', interceptDotPy) } +createInterceptDotPy('mitmproxyuser') + module.exports = { createInterceptDotPy } diff --git a/src/intercept.js b/src/intercept.js index 6abb16f..7eef86c 100644 --- a/src/intercept.js +++ b/src/intercept.js @@ -164,7 +164,7 @@ class Interceptor: def wildcard_to_regex(self, wildcard_domain): regex_pattern = re.escape(wildcard_domain) # Escape special characters - regex_pattern = regex_pattern.replace(r'\*', '.*') # Replace wildcard with regex equivalent + regex_pattern = regex_pattern.replace(r'\\*', '.*') # Replace wildcard with regex equivalent regex_pattern = '^' + regex_pattern + '$' # Ensure the pattern matches the entire string return re.compile(regex_pattern) @@ -292,4 +292,6 @@ addons = [Interceptor()] # pylint: disable=invalid-name fs.writeFileSync('intercept.py', interceptDotPy) } +createInterceptDotPy('mitmproxyuser') + module.exports = { createInterceptDotPy }