ccocot

Google.sh

Mar 3rd, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.10 KB | None | 0 0
  1. grabAndCatch(){
  2.   local STRING=$1
  3.   for (( i = 0; i < 10; i++ )); do
  4.     local RESULT=$(curl -s "http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=${STRING}&start=${i}0" \
  5.     -H "Host: www.google.com" \
  6.     -H "User-Agent: ncmpcpp 0.7" \
  7.     -H "Accept: */*" \
  8.     -H "accept-language: en-US,en;q=0.9" \
  9.     -H "Referer: http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=${STRING}&btnI=I%27m+Feeling+Lucky")
  10.     if [[ ${RESULT} =~ "did not match any documents." ]]; then
  11.       printf "[!] LAST PAGE \n\n"
  12.       return 1
  13.     fi
  14.     local SITE=$(echo "${RESULT}" | grep -Po "(?<=<cite>).*?(?=</cite>)" | sed -e 's/<[^>]*>//g')
  15.     printf "\e[1;97mPAGE ${i} \e[32m[${STRING}]\e[0m\n"
  16.     for url in ${SITE}; do
  17.       echo "- ${url}"
  18.     done
  19.   done
  20.   echo
  21. }
  22.  
  23. printf "\n\e[97m' I believe that pipe smoking contributes to \n a somewhat calm and objective judgment in all human affairs.'\e[0m\n - \e[1;97mAlbert Einstein\e[0m\n\n"
  24. printf "\e[1;31mGoogle Bypass Capcay ? \e[0m\nWritten lovingly by \e[1;97mccocot (ccocot@bc0de.net)\e[0m\n\n"
  25.  
  26. for word in $(cat $1); do
  27.   grabAndCatch "${word}"
  28. done
Add Comment
Please, Sign In to add comment