Skip to content
Snippets Groups Projects
Commit 451d804c authored by Symphorien Gibol's avatar Symphorien Gibol
Browse files

fix

parent 82bb28d4
No related branches found
No related tags found
No related merge requests found
......@@ -33,11 +33,15 @@ while 1:
for key, events in sel.select():
try:
if key.data=="tun":
print("tun")
s.sendto(base64.b64encode(tun.read(tun.mtu)), (PEER, PORT))
msg = tun.read(tun.mtu)
print("tun", msg, len(msg), "bytes")
msg = base64.b64encode(msg)+b"\n"
print("base64", msg, len(msg), "bytes")
print(msg, (PEER, PORT))
s.sendto(msg, (PEER, PORT))
elif key.data == "sms":
print("sms")
tun.write(base64.b64decode(s.recv(tun.mtu*4))+b"\n")
tun.write(base64.b64decode(s.recv(tun.mtu*4)))
except Exception:
traceback.print_exc()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment