Merge branch 'feature/support-hs105-protocol'

This commit is contained in:
David Haguenauer 2018-06-11 21:14:20 -04:00
commit 717db53032

View File

@ -21,6 +21,7 @@
#
import socket
import argparse
import struct
version = 0.1
@ -51,7 +52,7 @@ commands = {'info' : '{"system":{"get_sysinfo":{}}}',
# XOR Autokey Cipher with starting key = 171
def encrypt(string):
key = 171
result = "\0\0\0\0"
result = struct.pack(">I", len(string))
for i in string:
a = key ^ ord(i)
key = a