2
0
mirror of https://github.com/softScheck/tplink-smartplug synced 2026-01-11 23:38:46 +01:00

Fix character encoding during decryption

This commit is contained in:
Oliver Heimlich
2020-12-29 10:23:49 +01:00
committed by GitHub
parent 630c777049
commit 52fd4bad6d

View File

@@ -78,12 +78,12 @@ def encrypt(string):
def decrypt(string): def decrypt(string):
key = 171 key = 171
result = "" result = []
for i in string: for i in string:
a = key ^ i a = key ^ i
key = i key = i
result += chr(a) result.append(a)
return result return bytearray(result).decode('utf-8')
# Parse commandline arguments # Parse commandline arguments