mirror of
https://github.com/softScheck/tplink-smartplug
synced 2026-01-11 23:38:46 +01:00
Added Comments to easily identify code sections
This commit is contained in:
@@ -52,6 +52,7 @@ commands = {'info' : '{"system":{"get_sysinfo":{}}}',
|
||||
|
||||
# Encryption and Decryption of TP-Link Smart Home Protocol
|
||||
# XOR Autokey Cipher with starting key = 171
|
||||
# Python 3.x Version
|
||||
if sys.version_info[0] > 2:
|
||||
def encrypt(string):
|
||||
key = 171
|
||||
@@ -71,6 +72,7 @@ if sys.version_info[0] > 2:
|
||||
result += chr(a)
|
||||
return result
|
||||
|
||||
# Python 2.x Version
|
||||
else:
|
||||
def encrypt(string):
|
||||
key = 171
|
||||
|
||||
Reference in New Issue
Block a user