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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user