-
Notifications
You must be signed in to change notification settings - Fork 50
/
hrdev.py
66 lines (45 loc) · 1.29 KB
/
hrdev.py
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!c:\\python27\python.exe
# -*- coding: utf-8 -*-
'''Just a wrapper module.'''
import idaapi
from hrdev_plugin import Plugin
try:
from PySide import QtCore, QtGui
except:
from PyQt5 import QtCore, QtWidgets
__author__ = 'Arthur Gerkis'
__version__ = '0.0.4 (beta)'
class HRDEVPluginEntry(idaapi.plugin_t):
'''HRDEV Plugin Entry.'''
flags = idaapi.PLUGIN_UNL
comment = "Hex-Rays Decompiler Enhanced View"
help = ""
wanted_name = "HRDEV"
wanted_hotkey = "Alt+F5"
def init(self):
print "HRDEV plugin is loaded. Use Alt+F5 hotkey to decompile."
return idaapi.PLUGIN_OK
def run(self, arg):
Plugin().run()
def term(self):
return
class HRDEVMenuHandler(idaapi.action_handler_t):
def __init__(self):
idaapi.action_handler_t.__init__(self)
def activate(self, ctx):
Plugin().run()
return 1
def update(self, ctx):
return idaapi.AST_ENABLE_ALWAYS
idaapi.register_action(idaapi.action_desc_t(
'hrdev:decompile',
'Generate pseudocode (HRDEV)',
HRDEVMenuHandler(),
'Alt+F5',
'Generate pseudocode (HRDEV)'))
idaapi.attach_action_to_menu(
'View/Open subviews/Generate pseudocode',
'hrdev:decompile',
idaapi.SETMENU_APP)
def PLUGIN_ENTRY():
return HRDEVPluginEntry()