jleclanche / python-bna

Python implementation of the mobile Blizzard Authenticator (TOTP)
https://eu.battle.net/support/en/article/24520
MIT License
250 stars 38 forks source link

Dependency "bna" isn't compatible with python 2.7 #14

Closed MPX4132 closed 6 years ago

MPX4132 commented 6 years ago

Specifically, it crashes when an attempt is made to xor strings in the function decrypt(response, opt):

ret.append(c ^ e) # LINE 90: Bytes aren't supported in python 2.7

It'll probably also crash anywhere it uses the bytes(...) function.

MPX4132 commented 6 years ago

I worked around it by using the python 3 equivalent, and making the following changes:

MPX4132 commented 6 years ago

Did you guys fix it, or we gonna pretend it’s fixed?

jleclanche commented 6 years ago

It's not compatible with python 2.7, and that's intended. You need python 3 to run it.

MPX4132 commented 6 years ago

What’s the point in making the interpreter ambiguous?

#!/usr/bin/env python

Why not explicitly say python3? I reported the issue because the script crashed when I tried executing it. Why did it crash? That’s easy, my environment points python to python 2.7, not python 3.x, which is clearly what’s expected here. I think this is a bug, not a configuration issue.