From 35b8385d3a0c723ec9544b939d7152c49bf764e7 Mon Sep 17 00:00:00 2001 From: cccs-kevin Date: Wed, 21 Feb 2024 18:18:33 +0000 Subject: [PATCH] Adding handling for previously generated files --- jsjaws.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jsjaws.py b/jsjaws.py index 463d46f1..5baa3b43 100755 --- a/jsjaws.py +++ b/jsjaws.py @@ -1401,6 +1401,10 @@ def _run_the_gauntlet(self, request, file_path, file_content, subsequent_run: bo split_content = file_content.split(f"{DIVIDING_COMMENT}\n".encode()) if len(split_content) == 2: _, script_we_did_not_generate = split_content + # Looks like a file generated by JsJaws and attached as supplementary was resubmitted for analysis. + # Therefore we have to massage the file contents + elif len(split_content) > 2: + _, script_we_did_not_generate = split_content[-2:] else: script_we_did_not_generate = file_content if script_we_did_not_generate == b"" and not self.sus_form_actions: