diff --git a/oletools/olevba.py b/oletools/olevba.py index bec4ea16..403ae549 100644 --- a/oletools/olevba.py +++ b/oletools/olevba.py @@ -3655,8 +3655,10 @@ def analyze_macros(self, show_decoded_strings=False, deobfuscate=False): # variable to merge source code from all modules: if self.vba_code_all_modules is None: self.vba_code_all_modules = self.get_vba_code_all_modules() + strings = [] for (_, _, form_string) in self.extract_form_strings(): - self.vba_code_all_modules += form_string + '\n' + strings.append(form_string) + self.vba_code_all_modules.join(strings) # Analyze the whole code at once: scanner = VBA_Scanner(self.vba_code_all_modules) self.analysis_results = scanner.scan(show_decoded_strings, deobfuscate)