make it work with hs105

This commit is contained in:
Keith Chiem 2017-11-08 02:16:45 -08:00
parent a8f9e9d65c
commit 7fabe4574c
1 changed files with 2 additions and 1 deletions

View File

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