hoyori / idapython

Automatically exported from code.google.com/p/idapython
Other
1 stars 1 forks source link

Rerunning script from the recent script box (Alt-7) does not do so through init.py's runscript() #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

You can see that if the recent script box is used, the c++ module executes
the file directly:

http://code.google.com/p/idapython/source/browse/trunk/python.cpp#284

What it should do, like is done via Alt-9, is call runscript() in init.py:

http://code.google.com/p/idapython/source/browse/trunk/python.cpp#219
and
http://code.google.com/p/idapython/source/browse/trunk/python.cpp#221

The problem is that customizations made to runscript() will fail, and even
if (for example) issue 42 is fixed, it will still fail if the user used
Alt-7 instead of Alt-9

Original issue reported on code.google.com by cbwhiz@gmail.com on 20 Dec 2009 at 7:57

GoogleCodeExporter commented 9 years ago
You could also work around this by editing init.py's ScriptBox.run method:

change:
        if n > 0:
            return self.list[n-1]

to:

        if n > 0:
            file = self.list[n-1]
            runscript(file)
            return None

Original comment by cbwhiz@gmail.com on 20 Dec 2009 at 8:06

GoogleCodeExporter commented 9 years ago
Fixed in http://code.google.com/p/idapython/source/detail?r=272

It should work even if you only update the init.py for now.

Original comment by gergely.erdelyi on 4 Feb 2010 at 9:00