Skip to content

Instantly share code, notes, and snippets.

@aggelis
Forked from iamshreeram/udp-spoof.py
Created October 12, 2022 09:13
Show Gist options
  • Select an option

  • Save aggelis/a490054cf87a8539faaa623108043275 to your computer and use it in GitHub Desktop.

Select an option

Save aggelis/a490054cf87a8539faaa623108043275 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