make it work with hs105
This commit is contained in:
parent
a8f9e9d65c
commit
7fabe4574c
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user