Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from crypto import *
- from socket import *
- s = socket(AF_INET,SOCK_STREAM)
- s.connect(('nope, not telling you', 20))
- a = Crypto('gen', '', 5)
- get = []
- while True:
- get.append(s.recv(4096).decode())
- if 'CRYPT_KEY' in get[-1]:
- a.key = s.recv(4096).decode()
- continue
- elif get[-1] == 'FIN\n':
- s.close()
- get.pop([-1])
- break
- print(get[-1])
- s.send(b'ACK\n')
- continue
- out = ''
- for word in get:
- a.update(word)
- print(a.Out())
- out += a.Out()+' '
Advertisement
Add Comment
Please, Sign In to add comment