Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ image::ipyida-screenshot.png[IPyIDA screenshot,width=100%]
== Install

IPyIDA has been tested with IDA 6.6 and up on Windows, OS X and Linux, up to
7.4.
7.5.

=== Fast and easy install

Expand Down
28 changes: 28 additions & 0 deletions ipyida/ida_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,34 @@ def init(self):
return idaapi.PLUGIN_KEEP

def run(self, args):
# I'm not sure whether args were always wrapped in an object,
# so just incase, we will check for the case of `int`
if isinstance(args, int):
value = args
else:
value = getattr(args, 'value', 0)

# trigger manual shutdown, ergo restart via:
# ida_loader.load_and_run_plugin('ipyida', 2)
# then:
# ida_loader.load_and_run_plugin('ipyida', 0)
# (or press shift-. again)
if value == 2:
return self.term()

# enable diagnostics mode
if value == 3:
globals()['obj'] = self
print("""IPyIDA diagnostics instance created

instance be accessed via:
import ipyida
ipyida.ida_plugin.obj.*
e.g.
ipyida.ida_plugin.obj.term()
""")
return

if not self.kernel.started:
self.kernel.start()
if self.widget is None:
Expand Down