Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Python3 support #99

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Python3 support #99

wants to merge 11 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Oct 20, 2019

I've tried the following things which work:

  • Change settings (name, color)
  • Connect to a server
  • Create several projects, several databases
  • Save a project to the server
  • Load a project to the server

I haven't tried to use it with other people, because I do not have friends yet (wip).

elp0t0r1c0 added 11 commits October 20, 2019 14:59
If the network was unreachable, the loop for sending the broadcast was being
performed infinitely, because the payload 'request' could not shrink
Hash ends with a null byte too, so we remove this null byte.
The `.decode('utf-8')` is safe because hash holds an hex value,
which is obviously ascii.
(for using type() builtin function)
hashset yields an error (3rd argument is not void const*).
See https://github.com/idapython/src/blob/master/swig/netnode.i#L162: using
now hashset_buf
On my ArchLinux, sys.platform returns 'linux', not 'linux2' :-D
When a client connects, he does not write anything, but the QT write notifier
was enabled. This case was not properly handled by the _notify_write method
It returns a true string instead of bytes
@patateqbool patateqbool marked this pull request as ready for review December 23, 2019 09:04
@patateqbool
Copy link
Member

Hi @elp0t0r1c0, thank you very much for your work!
I haven’t been capable to merge all your commits because some of them break the python2/python3 compatibility and we want to be compatible with IDA 7.0 at least.
All the commits about bug fixes have been cherry-picked from your fork, and I’ve added the support for python3 and I’ve kept the support for python2 thanks to your other commits.

I’m currently testing all the features, I will continue to work from there. Feel free to continue on your side too!

@patateqbool
Copy link
Member

Hi @elp0t0r1c0,
I tried today to port everything to be compatible python2 and python3 in the same time. It will introduce a lot of changes as a client on one side can be python2 and the other in the other side can be python3 for exemple...
It’s possible to keep the compatibility, but at a higher cost than just porting everything for python3.
Here is my proposition, I will make a new branch for the python3 support, and as soon as IDA will drop the python2 support (I think it’s a question of month as python2 will reach its end of life in January 2020), I will merge this new branch on master.

I’m also interested by your point of view @NeatMonster.

@NeatMonster
Copy link
Member

Since all network packets are JSON objects, I don't see why dropping Python 2 support would change anything in that regard. I would advise to keep the Python 2/3 compatibility, but drop support for older versions of IDA Pro.

@patateqbool
Copy link
Member

Ok, I was trying to do things wrong just above, and with this comprehension I though it would need a lot of changes. I was wrong, and effectively it seems that dropping python2 will not change anything, except adding some wrapper as it’s already the case for the Event part.

My bad, thanks @NeatMonster!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants