-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathIdaMSDNHelp.py
More file actions
41 lines (31 loc) · 1.16 KB
/
IdaMSDNHelp.py
File metadata and controls
41 lines (31 loc) · 1.16 KB
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
33
34
35
36
37
38
39
40
__author__ = "Andrea Fioraldi"
__copyright__ = "Copyright 2017, Andrea Fioraldi"
__license__ = "MIT"
__email__ = "andreafioraldi@gmail.com"
import idaapi
import webbrowser
MENU_PATH = 'Edit/Other'
class IdaMSDNHelpPlugin(idaapi.plugin_t):
flags = idaapi.PLUGIN_KEEP
comment = ""
help = "IdaMSDNHelp: MSDN Help for IDA Pro"
wanted_name = "IDA MSDN Help"
wanted_hotkey = "Alt-R"
def init(self):
r = idaapi.add_menu_item(MENU_PATH, 'Open MSDN Search', '', 1, self.openHelp, tuple())
if r is None:
idaapi.msg("IdaMSDNHelp: add menu failed!\n")
idaapi.msg("IdaMSDNHelp: initialized, opening webbrowser with '%s' command\n" % webbrowser.get().name)
return idaapi.PLUGIN_KEEP
def run(self, arg):
self.query()
def term(self):
idaapi.msg("IdaMSDNHelp: terminated\n")
def openHelp(self):
webbrowser.open("https://social.msdn.microsoft.com/search/en-US")
def query(self):
func = idaapi.get_highlighted_identifier()
url = "https://social.msdn.microsoft.com/search/en-US?query=" + func
webbrowser.open(url)
def PLUGIN_ENTRY():
return IdaMSDNHelpPlugin()