Skip to content

Instantly share code, notes, and snippets.

@zyzof
Created January 3, 2014 12:20
Show Gist options
  • Save zyzof/8237071 to your computer and use it in GitHub Desktop.
Save zyzof/8237071 to your computer and use it in GitHub Desktop.
Sending spoofed raw packets with scapy
from scapy.all import *
import time
ip = IP(dst='192.168.1.1', src='192.168.1.1')
udp = UDP(sport=1234,dport=1234)
payload = '\x01\x0f'
packet = ip/udp/payload
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