r4sas / PBinCLI

PrivateBin CLI on python 3
MIT License
66 stars 25 forks source link

binascii.Error: Incorrect padding #42

Open YuriyGavrilov opened 1 year ago

YuriyGavrilov commented 1 year ago

Strange error, but in browser works well.

may be it helps https://gist.github.com/perrygeo/ee7c65bb1541ff6ac770

Paste received! Decoding…
Traceback (most recent call last):
  File "/home/yu.gavrilov@group.s7/.local/bin/pbincli", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/yu.gavrilov@group.s7/.local/lib/python3.11/site-packages/pbincli/cli.py", line 161, in main
    args.func(args, api_client, settings=CONFIG)
  File "/home/yu.gavrilov@group.s7/.local/lib/python3.11/site-packages/pbincli/actions.py", line 159, in get
    paste.setHash(passphrase)
  File "/home/yu.gavrilov@group.s7/.local/lib/python3.11/site-packages/pbincli/format.py", line 119, in setHash
    self._key = b64decode(passphrase)
                ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/base64.py", line 88, in b64decode
    return binascii.a2b_base64(s, strict_mode=validate)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
binascii.Error: Incorrect padding