Skip to content

Instantly share code, notes, and snippets.

@iamshreeram
Created October 23, 2020 07:40
Show Gist options
  • Save iamshreeram/d60327bcc7e03acb4cb9da032edd62d4 to your computer and use it in GitHub Desktop.
Save iamshreeram/d60327bcc7e03acb4cb9da032edd62d4 to your computer and use it in GitHub Desktop.
Simple python code to spoof udp source and destination
from scapy.all import *
import time
ip = IP(dst='127.0.0.127', src='10.99.99.99')
udp = UDP(sport=321,dport=123)
payload = '\x01\x0f'
packet = ip/udp/payload
send(packet)
while(True):
send(packet)
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment