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:
@@ -78,12 +78,12 @@ def encrypt(string):
|
||||
|
||||
def decrypt(string):
|
||||
key = 171
|
||||
result = ""
|
||||
result = []
|
||||
for i in string:
|
||||
a = key ^ i
|
||||
key = i
|
||||
result += chr(a)
|
||||
return result
|
||||
result.append(a)
|
||||
return bytearray(result).decode('utf-8')
|
||||
|
||||
|
||||
# Parse commandline arguments
|
||||
|
||||
Reference in New Issue
Block a user