fix: update aes
This commit is contained in:
@@ -38,12 +38,11 @@ class Task(socketserver.BaseRequestHandler):
|
||||
data = self.recv(prompt=b'')
|
||||
data = b'cqupt'+ data + flag
|
||||
# len(flag) == 21
|
||||
# wordlist = b'123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM{}_'
|
||||
# wordlist = b'0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM{}_'
|
||||
if len(data)%16 != 0:
|
||||
pad = b'0' * (16 - len(data)%16)
|
||||
data = data + pad
|
||||
cipher = aes.encrypt(data)
|
||||
print(aes.decrypt(cipher))
|
||||
cipher = base64.b64encode(cipher)
|
||||
self.send(cipher)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user