Skip to content

Instantly share code, notes, and snippets.

View tedpearson's full-sized avatar

Ted Pearson tedpearson

View GitHub Profile
#!/usr/bin/env python3
# Super simple script that listens to a local UDP port and relays all packets to an arbitrary remote host.
# Packets that the host sends back will also be relayed to the local UDP client.
# Works with Python 2 and 3
import ipaddress
import socket
import sys
# Whether or not to print the IP address and port of each packet received
debug = False