Skip to content

Commit

Permalink
Improved regex for variations of messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua van der Poll authored and Joshua van der Poll committed Feb 19, 2023
1 parent bbd3238 commit a5f9dbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CVE-2021-3129.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def find_log_path(self, content):
log_path = None

# Regex search for file path
search_pattern = r"The GET method is not supported for this route\. Supported methods: POST\. in file (.*?) on line"
search_pattern = r"The .* supported .* in file (.*?) on line"
search_res = re.search(search_pattern, str(content))

if search_res:
Expand All @@ -364,7 +364,7 @@ def find_log_path(self, content):
return log_path

def find_laravel_version(self, content: str):

# Regex search for framework version
search_pattern = r"\"framework_version\":\"(.*?)\""
search_res = re.search(search_pattern, content)
Expand Down

0 comments on commit a5f9dbf

Please sign in to comment.