ioncodes / idacode

An integration for IDA and VS Code which connects both to easily execute and debug IDAPython scripts.
725 stars 77 forks source link

Python2 support #8

Closed MeitarR closed 4 years ago

MeitarR commented 4 years ago

solves #3

as I wrote at the last commit, I'm not sure that asyncio is needed at all but I can't check that as I don't have Ida with python 3 support. It will be better if someone will check that before its merged.

tested on IDA 7.0 and python 2: executing and debugging works.

ioncodes commented 4 years ago

Thanks for the PR! I'll have a look at it.

ioncodes commented 4 years ago

asyncio seems to be required for Python 3. Well done with the PR, it works flawlessly from what I can tell. Is there a specific reason why you added a __init__.py?

MeitarR commented 4 years ago

asyncio seems to be required for Python 3. Well done with the PR, it works flawlessly from what I can tell. Is there a specific reason why you added a __init__.py?

without it I get the error

C:\Program Files\IDA 7.0\plugins\idacode.py: No module named idacode_utils.plugin
Traceback (most recent call last):
  File "C:\Program Files\IDA 7.0\python\ida_idaapi.py", line 553, in IDAPython_ExecScript
    execfile(script, g)
  File "C:/Program Files/IDA 7.0/plugins/idacode.py", line 6, in <module>
    import idacode_utils.plugin as plugin
ImportError: No module named idacode_utils.plugin

because its not a module

ioncodes commented 4 years ago

Interesting! That seems to be an issue with IDA 7.0 specifically, I wasn't aware of this. I can't trigger that issue with IDA 7.2 and IDA 7.4. Nice catch! I'll update a few things in this PR to get things ready for a new release :)