From 27d5f43563c40ca8e2861f2aa91abf9aab1ac71d Mon Sep 17 00:00:00 2001 From: bandrel Date: Tue, 30 Oct 2018 14:26:44 -0400 Subject: [PATCH] quick fix for unicode errors on recycling --- hate_crack.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hate_crack.py b/hate_crack.py index 3c4de01..b84fd42 100755 --- a/hate_crack.py +++ b/hate_crack.py @@ -1018,7 +1018,10 @@ def convert_hex(working_file): for line in f: match = re.search(regex, line.rstrip('\n')) if match: - processed_words.append(binascii.unhexlify(match.group(1)).decode('utf-8')) + try: + processed_words.append(binascii.unhexlify(match.group(1)).decode('utf-8')) + except UnicodeDecodeError: + pass else: processed_words.append(line.rstrip('\n'))