forked from ReFirmLabs/binwalk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbinida.py
More file actions
executable file
·33 lines (25 loc) · 920 Bytes
/
binida.py
File metadata and controls
executable file
·33 lines (25 loc) · 920 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import idc
import idaapi
import binwalk
class binwalk_t(idaapi.plugin_t):
flags = 0
comment = "Scan the current IDB for file signatures"
help = ""
wanted_name = "Binwalk IDA Plugin"
wanted_hotkey = ""
def init(self):
self.menu_context_1 = idaapi.add_menu_item("Search/", "binwalk opcodes", "", 0, self.opcode_scan, (None,))
self.menu_context_2 = idaapi.add_menu_item("Search/", "binwalk signatures", "", 0, self.signature_scan, (None,))
return idaapi.PLUGIN_KEEP
def term(self):
idaapi.del_menu_item(self.menu_context_1)
idaapi.del_menu_item(self.menu_context_2)
return None
def run(self, arg):
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()