Fixing Join accept payload decryption with CRC

This commit is contained in:
Sebastien Dudek 2021-03-30 22:04:02 +02:00
parent 7896e84f20
commit 50e12c4b8d
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ def JoinAcceptPayload_decrypt(key, hexpkt):
In(2): String packet
Out: String decrypted Join accept packet
"""
payload = hexpkt[4:]
payload = hexpkt[4:-2] # removing CRC
cipher = AES.new(key, AES.MODE_ECB)
return cipher.encrypt(payload) # logic right? :D