Skip to content

Commit a09aaba

Browse files
committed
modified sighash to use hashlib versus hash. 'hash' produced different values for new IDA instances.
1 parent e3dc140 commit a09aaba

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

plugins/rizzo/rizzo.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import time
3535
import pickle # http://natashenka.ca/pickle/
3636
import collections
37+
import hashlib
3738

3839
from shims import ida_shims
3940

@@ -163,7 +164,11 @@ def load(self):
163164
return sigs
164165

165166
def sighash(self, value):
166-
return hash(str(value)) & 0xFFFFFFFF
167+
h = hashlib.md5()
168+
h.update(value.encode("utf-8"))
169+
hash_value = h.hexdigest()
170+
del(h)
171+
return hash_value
167172

168173
def block(self, block):
169174
'''
@@ -340,7 +345,6 @@ def match(self, extsigs):
340345
strings = {}
341346
immediates = {}
342347

343-
344348
# Match formal function signatures
345349
start = time.time()
346350
for (extsig, ext_func_ea) in extsigs.formal.items():

0 commit comments

Comments
 (0)