From 98e6231035279d9d5ed8ec9d8da5ecce3118afb0 Mon Sep 17 00:00:00 2001 From: Florian Roth Date: Tue, 29 Dec 2020 11:20:36 +0100 Subject: [PATCH] fix: bug in super rule generation --- yarGen.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yarGen.py b/yarGen.py index c1cede2..a76dc2d 100644 --- a/yarGen.py +++ b/yarGen.py @@ -309,7 +309,9 @@ def extract_strings(fileData): # WIDE for ws in wide_strings: # Decode UTF16 and prepend a marker (facilitates handling) - strings.append(("UTF16LE:%s" % ws.decode('utf-16')).encode('utf-8')) + wide_string = ("UTF16LE:%s" % ws.decode('utf-16')).encode('utf-8') + if wide_string not in strings: + strings.append(wide_string) for string in strings: # Escape strings if len(string) > 0: