run python NavicatCipher.py enc -ncx "This is a test" has some error
xjl456852 opened this issue · comments
I use python version 3.8.2
$ python NavicatCipher.py enc -ncx "This is a test"
Traceback (most recent call last):
File "NavicatCipher.py", line 111, in
exit(Main(len(sys.argv), sys.argv))
File "NavicatCipher.py", line 100, in Main
print(Navicat12Crypto().EncryptStringForNCX(argv[3]))
File "NavicatCipher.py", line 63, in EncryptStringForNCX
padded_plaintext = Padding.pad(s.encode('ascii'), AES.block_size, stype = 'pkcs7')
TypeError: pad() got an unexpected keyword argument 'stype'
$ python NavicatCipher.py dec -ncx B75D320B6211468D63EB3B67C9E85933
Traceback (most recent call last):
File "NavicatCipher.py", line 111, in
exit(Main(len(sys.argv), sys.argv))
File "NavicatCipher.py", line 102, in Main
print(Navicat12Crypto().DecryptStringForNCX(argv[3]))
File "NavicatCipher.py", line 69, in DecryptStringForNCX
return Padding.unpad(padded_plaintext, AES.block_size, stype = 'pkcs7').decode('ascii')
TypeError: unpad() got an unexpected keyword argument 'stype'
Sorry, there is a typo. Latest commit has fixed it.