diff --git a/sig_checker.py b/sig_checker.py index fc181d8..3a4a74e 100755 --- a/sig_checker.py +++ b/sig_checker.py @@ -80,15 +80,15 @@ def validate(): result_count = 0 sig_addr = text.start_ea + # Expects a byte array + fmt_sig = [int(s, 16).to_bytes(1, 'little') if s != '??' else b'\0' for s in sig.split(' ')] + fmt_sig = b''.join(fmt_sig) + + # Another byte array, 0 = "??" wildcard + sig_mask = [int(b != '??').to_bytes(1, 'little') for b in sig.split(' ')] + sig_mask = b''.join(sig_mask) + while True: - # Expects a byte array - fmt_sig = [int(s, 16).to_bytes(1, 'little') if s != '??' else b'\0' for s in sig.split(' ')] - fmt_sig = b''.join(fmt_sig) - - # Another byte array, 0 = "??" wildcard - sig_mask = [int(b != '??').to_bytes(1, 'little') for b in sig.split(' ')] - sig_mask = b''.join(sig_mask) - sig_addr = idaapi.bin_search( sig_addr, text.end_ea,