This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |