#!/usr/bin/python3 ''' Send a UDP packet using Python Author: Tim Pierson, Dartmouth CS55, Winter 2021 From Du: Computer and Internet Security run: python3 send_upd.py set up netcat to listen for packet before sending nc -luv 9090 ''' import socket dest_addr = "127.0.0.1" port = 9090 data = b'Hello world!' if __name__ == '__main__': sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.sendto(data,(dest_addr,port))