Name |
Last commit
|
Last update |
---|---|---|
yara @ d522a891 | ||
.gitmodules | ||
LICENSE | ||
README.rst | ||
config.h | ||
setup.cfg | ||
setup.py | ||
setupwin32.py | ||
setupwin64.py | ||
tests.py | ||
yara-python.c |
Implement a callback to handle module data. It will be given a dictionary which contains all the information stored in the module that is fit for consumption. Things like functions are left out. You can now do things like this: ``` import yara import json from pprint import pprint def modules_callback(d): try: pprint(d) # This will not work if you have non-ASCII in your strings. #print json.dumps(d, indent=4) except Exception as e: print "Exception: %s" % e return yara.CALLBACK_CONTINUE rules = yara.compile(source='import "pe" rule always_false { condition: false }') with open('foo.exe') as f: rules.match(data=f.read(), modules_callback=modules_callback) ```
Name |
Last commit
|
Last update |
---|---|---|
yara @ d522a891 | ||
.gitmodules | Loading commit data... | |
LICENSE | Loading commit data... | |
README.rst | Loading commit data... | |
config.h | Loading commit data... | |
setup.cfg | Loading commit data... | |
setup.py | Loading commit data... | |
setupwin32.py | Loading commit data... | |
setupwin64.py | Loading commit data... | |
tests.py | Loading commit data... | |
yara-python.c | Loading commit data... |