-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathVirusBattle_IDA_Plugin.py
45 lines (35 loc) · 1.07 KB
/
VirusBattle_IDA_Plugin.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
"""Main entrypoint for the plugin that make an instance of the MainWidget and
set it to IDA layout
Returns:
TYPE: Description
"""
from idaapi import PluginForm
from PySide import QtCore, QtGui
from virusbattle.VBMainWidget import VBMainWidget
import virusbattle.VBIDAHelper
class VBPluginForm(PluginForm):
"""IDA Plugin Form
"""
def OnCreate(self, form):
"""Make an instance of `VBMainWidget` and set it in the form layout
on create
Args:
form (TYPE): Description
"""
self.parent = self.FormToPySideWidget(form)
layout = QtGui.QVBoxLayout()
self.widget = VBMainWidget()
layout.addWidget(self.widget)
self.parent.setLayout(layout)
def OnClose(self, form):
"""
Args:
form (TYPE): Description
"""
def main():
"""Run the Plugin form
"""
plg = VBPluginForm()
plg.Show('Virus Battle', PluginForm.FORM_SAVE | PluginForm.FORM_RESTORE )
if __name__ == "__main__":
main()