Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make it compatible with Python 2.7 #13

Closed
j-ed opened this issue Dec 15, 2017 · 1 comment
Closed

make it compatible with Python 2.7 #13

j-ed opened this issue Dec 15, 2017 · 1 comment

Comments

@j-ed
Copy link

j-ed commented Dec 15, 2017

Hi @hannob I like to run your program on one of my servers which has Python 2.7 installed by default.
Now I wonder if it would be possible to make it compatible with this version. I already did some tests on my own but without success (I'm not a Python expert). The following error is shown if I execute it:

...
RSA e: 0x10001
Modulus size: 2048 bits, 256 bytes
Traceback (most recent call last):
  File "./robot-detect", line 184, in <module>
    pms_good = int(gmpy2.powmod(pms_good_in, e, N)).to_bytes(modulus_bytes, byteorder="big")
AttributeError: 'long' object has no attribute 'to_bytes'

From what I understood a to_bytes attribute doesn't exist for that version, but people seem to have discussed this kind of problem already and provided possible workarounds: therealmik/pyrdiff#1

@hannob
Copy link
Contributor

hannob commented Dec 15, 2017

I have no interest in making the code less readable to make it compatible with outdated python versions, sorry. You don't have to run the code on the server you're testing.

@hannob hannob closed this as completed Dec 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants