From 6309606c77b4593b7605d91785866b3a564e08e8 Mon Sep 17 00:00:00 2001 From: Adam <37312852+Aptimex@users.noreply.github.com> Date: Sat, 28 Sep 2024 18:35:43 -0600 Subject: [PATCH] Both checks to mimimize false positives --- traceKeyExtractor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/traceKeyExtractor.py b/traceKeyExtractor.py index 2d075c9..3e23c24 100644 --- a/traceKeyExtractor.py +++ b/traceKeyExtractor.py @@ -233,8 +233,9 @@ def bruteForce(args): for line in output.splitlines(): line = line.decode("utf-8") #Convert from byte array to string - #Search for the line that says valid key. Example: "Valid Key found [ 63654db94d97 ] - if "matches candidate" not in line: + #Search for the line that says valid key. Example: "Valid Key found [ 63654db94d97 ] - matches candidate" + #In rare cases, multiple possible keys will be found. The "matches candidate" tag should indicate the right one + if "Valid Key" not in line or "matches candidate" not in line: continue print(f" {line}")