From cef33b842529305484015057c6a7eb693a7d8b08 Mon Sep 17 00:00:00 2001 From: Samuel Tseng Date: Thu, 20 Feb 2020 00:04:56 -0800 Subject: [PATCH] Added Comments to easily identify code sections --- tplink_smartplug.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tplink_smartplug.py b/tplink_smartplug.py index 1b1f55c..11c3d3b 100755 --- a/tplink_smartplug.py +++ b/tplink_smartplug.py @@ -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