Commit 3550ce17 by devttys0

Added binwalk IDA plugin

parent dc7c28c6
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
import os import os
import sys import sys
import argparse import argparse
import binwalk.core.idb
import binwalk.core.filter import binwalk.core.filter
import binwalk.core.common import binwalk.core.common
import binwalk.core.display import binwalk.core.display
...@@ -130,7 +131,8 @@ class General(Module): ...@@ -130,7 +131,8 @@ class General(Module):
if self.show_help: if self.show_help:
show_help() show_help()
sys.exit(0) if not binwalk.core.idb.LOADED_IN_IDA:
sys.exit(0)
def reset(self): def reset(self):
for fp in self.target_files: for fp in self.target_files:
......
import idc
import idaapi
import binwalk
class binwalk_t(idaapi.plugin_t):
flags = 0
comment = "Binwalk IDA Plugin"
help = ""
wanted_name = "Binwalk IDA Plugin"
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,))
return idaapi.PLUGIN_KEEP
def term(self):
idaapi.del_menu_item(self.menu_context)
return None
def run(self, arg):
self.binwalk.execute()
def PLUGIN_ENTRY():
return binwalk_t()
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