natewong1313 / bird-bot

A Nintendo Switch checkout bot. Currently supports Walmart and Best buy
MIT License
1.18k stars 336 forks source link

Error after updating #25

Open kadrek opened 4 years ago

kadrek commented 4 years ago

Happens when starting tasks after updating to latest version.

Traceback (most recent call last): File "C:\Users\USER\Desktop\bird-bot\pages\homepage.py", line 477, in run profile,proxy = get_profile(self.profile),get_proxy(self.proxies) File "C:\Users\USER\Desktop\bird-bot\utils.py", line 59, in get_profile p["card_number"] = (Encryption().decrypt(p["card_number"].encode("utf-8"))).decode("utf-8") File "C:\Users\USER\Desktop\bird-bot\utils.py", line 42, in decrypt aes = AES.new(self.trans(e_key), AES.MODE_CFB, IV) File "C:\Users\USER\AppData\Local\Programs\Python\Python38\lib\site-packages\Cryptodome\Cipher\AES.py", line 232, in new return _create_cipher(sys.modules[name], key, mode, *args, kwargs) File "C:\Users\USER\AppData\Local\Programs\Python\Python38\lib\site-packages\Cryptodome\Cipherinit.py", line 79, in _create_cipher return modes[mode](factory, kwargs) File "C:\Users\USER\AppData\Local\Programs\Python\Python38\lib\site-packages\Cryptodome\Cipher_mode_cfb.py", line 284, in _create_cfb_cipher raise ValueError("Incorrect IV length (it must be %d bytes long)" % ValueError: Incorrect IV length (it must be 16 bytes long)

ohmantics commented 4 years ago

Delete your payment info and recreate it. PR #26 might fix this, but it's easy to work around.

kadrek commented 4 years ago

I fixed it soon after posting this with the info below.

Remove line 59 p["card_number"] = (Encryption().decrypt(p["card_number"].encode("utf-8"))).decode("utf-8")

and replace it with try: p["card_number"] = (Encryption().decrypt(p["card_number"].encode("utf-8"))).decode("utf-8")
except ValueError:
pass