diff options
Diffstat (limited to 'vpn/UDPtester.py')
| -rwxr-xr-x | vpn/UDPtester.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vpn/UDPtester.py b/vpn/UDPtester.py new file mode 100755 index 0000000..99b5412 --- /dev/null +++ b/vpn/UDPtester.py @@ -0,0 +1,16 @@ +#!/usr/bin/python + +import socket +import sys, tty, termios + +UDP_IP = "10.10.10.2" +UDP_PORT = 5000 + +sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # UDP + +fd = sys.stdin.fileno() +tty.setraw(sys.stdin.fileno()) + +while True: + s = sys.stdin.read(1) + sock.sendto(s, (UDP_IP, UDP_PORT)) |
