Commit 33860a19 by devttys0

Minor documentation changes; updated example scripts; improved binida.py IDA plugin.

parent 65b0739b
......@@ -87,4 +87,4 @@ $ sudo python setup.py uninstall
$ sudo python3 setup.py uninstall
```
Note that this does _not_ remove any of the installed dependencies.
Note that this does _not_ remove any of the manually installed dependencies.
......@@ -20,7 +20,6 @@ $ sudo apt-get install python-lzma
For instructions on installing optional dependencies, see [INSTALL.md](https://github.com/devttys0/binwalk/blob/master/INSTALL.md).
For advanced installation options, see [INSTALL.md](https://github.com/devttys0/binwalk/blob/master/INSTALL.md).
Usage
=====
......
......@@ -10,16 +10,23 @@ class binwalk_t(idaapi.plugin_t):
wanted_hotkey = ""
def init(self):
self.binwalk = binwalk.Modules(idc.GetIdbPath(), signature=True)
self.menu_context = idaapi.add_menu_item("Search/", "binwalk scan", "Alt-9", 0, self.run, (None,))
self.menu_context_1 = idaapi.add_menu_item("Search/", "executable opcodes", "", 0, self.opcode_scan, (None,))
self.menu_context_2 = idaapi.add_menu_item("Search/", "file signatures", "", 0, self.signature_scan, (None,))
return idaapi.PLUGIN_KEEP
def term(self):
idaapi.del_menu_item(self.menu_context)
idaapi.del_menu_item(self.menu_context_1)
idaapi.del_menu_item(self.menu_context_2)
return None
def run(self, arg):
self.binwalk.execute()
return None
def signature_scan(self, arg):
binwalk.scan(idc.GetIdbPath(), signature=True)
def opcode_scan(self, arg):
binwalk.scan(idc.GetIdbPath(), opcode=True)
def PLUGIN_ENTRY():
return binwalk_t()
......
......@@ -4,4 +4,4 @@ import binwalk
# Since no options are specified, they are by default taken from sys.argv.
# Effecitvely, this duplicates the functionality of the normal binwalk script.
binwalk.execute()
binwalk.scan()
......@@ -5,7 +5,7 @@ import binwalk
try:
# Perform a signature scan against the files specified on the command line and suppress the usual binwalk output.
for module in binwalk.execute(*sys.argv[1:], signature=True, quiet=True):
for module in binwalk.scan(*sys.argv[1:], signature=True, quiet=True):
print ("%s Results:" % module.name)
for result in module.results:
print ("\t%s 0x%.8X %s" % (result.file.name, result.offset, result.description))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment