delta2hdx / jsunpack-n

Automatically exported from code.google.com/p/jsunpack-n
GNU General Public License v2.0
0 stars 0 forks source link

jsunpack is incompatible with yara-python-1.4a #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The problem is related with a change in the Match object. The 'strings' 
attribute of Match was a dictionary in previous versions of yara-python, but 
starting with version 1.4 is a list of tuples. Each tuple contains the offset, 
string identifier, and string data.

Lines 56-57 of detection.py should be changed from:

for s in match.strings:
      msg.append(match.strings[s])

to:

for (offset, identifier, string) in match.strings:
     msg.append(string)

Maybe would be a good idea to do something like:

if type(match.strings) is dict:
      for s in match.strings:
           msg.append(match.strings[s])
else:
     for (offset, identifier, string) in match.strings:
           msg.append(string)

Original issue reported on code.google.com by plus...@gmail.com on 16 Feb 2011 at 10:43

GoogleCodeExporter commented 9 years ago
Pushed changes that should fix this right up. 

Original comment by andre.lu...@gmail.com on 22 Aug 2011 at 11:09