diff --git a/README.adoc b/README.adoc index 507b861..ab5596e 100644 --- a/README.adoc +++ b/README.adoc @@ -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 diff --git a/ipyida/ida_plugin.py b/ipyida/ida_plugin.py index d065b07..e8ed0df 100644 --- a/ipyida/ida_plugin.py +++ b/ipyida/ida_plugin.py @@ -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: