cyberblackhole/TokenBreaker

Support to python3

Closed this issue · 0 comments

Extended support to python3, you may exclude python2

As we know, python2 is near to its deadline for its maintenance and support.

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support

And, while running your code RsaToHmac.py using python3 results the following output:

Traceback (most recent call last):
  File "./RsaToHmac.py", line 75, in <module>
    main()
  File "./RsaToHmac.py", line 72, in main
    print_header(args.token,args.pubkey)
  File "./RsaToHmac.py", line 43, in print_header
    payload = base64.b64decode(pad_check(token.split('.')[1]))
  File "./RsaToHmac.py", line 38, in pad_check
    data += b'='* (4 - missing_padding)
TypeError: must be str, not bytes

Also, TheNone.py using python3:

Traceback (most recent call last):
  File "./TheNone.py", line 67, in <module>
    main()
  File "./TheNone.py", line 64, in main
    processTheNoneToken(args.token)
  File "./TheNone.py", line 41, in processTheNoneToken
    payload=base64.b64decode(verify_Padding(token.split('.')[1]))
  File "./TheNone.py", line 36, in verify_Padding
    data += b'='* (4 - missing_padding)
TypeError: must be str, not bytes