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

Merge pull request #85 from oheim/patch-1

Fix character encoding of response
This commit is contained in:
softScheck GmbH
2024-10-08 16:44:13 +02:00
committed by GitHub

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