SHARE
TWEET

Bing Dorker 2018

zerobyte-id Sep 24th, 2018 (edited) 1,020 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. # Name     : Bing Dorker 2018
  3. # Type     : -
  4. # Vendor   : http://zerobyte.id/
  5. # Version  : 2018.01
  6. #
  7. # Installation :
  8. #   wget -O bingdorker.sh https://pastebin.com/raw/inDnkVhx;sed -i -e 's/\r$//' bingdorker.sh;chmod +x bingdorker.sh;
  9. # Run :
  10. #   ./bingdorker.sh
  11.  
  12. ### YOU CAN CUSTOM HERE ###
  13. JOBS=("weather", "maps", "about", "contact", "calendar", "movies", "entertainment", "animal", "sports", "news", "flights", "prince", "discover", "thesaurus", "bitcoin", "america", "venezuela", "indonesia", "machine", "technology", "soft", "software", "warehouse", "health", "healthy", "professor", "doctor", "university", "college", "website", "blog", "faculty", "machine", "world", "article", "asian", "europe", "asia", "australia", "science");
  14. MAXDUP="5"; # Min 5
  15. ###########################
  16.  
  17. echo "                    ::     ";
  18. echo " www.zerobyte.id  ,::'\    ";
  19. echo "       __       ,::' ' \   ";
  20. echo "     /'  '\'~~'~' \ /'\.)  ";
  21. echo "  ,:(      )    /  |       ";
  22. echo " ,:' \    /-.,,(   )       ";
  23. echo "      ) /       ) /        ";
  24. echo "      ||        ||    BING ";
  25. echo "      (_\       (_\ DORKER ";
  26. echo "-------- V 2018.01 --------";
  27.  
  28. if [[ -f "BINGJOB.FILE" ]];then
  29.     rm BINGJOB.FILE
  30.     touch BINGJOB.FILE
  31. fi
  32.  
  33. function doBing() {
  34.     DORK=$(echo ${1} | sed 's/=/%3D/g' | sed 's/?/%3F/g' | sed 's/\//%2F/g' | sed 's/ /+/g' | sed 's/"/%22/g' | sed 's/&/%26/g' | sed 's/:/%3A/g');
  35.     WORD="${2}";
  36.     TMPRES="${3}";
  37.     MAXCPN="${4}";
  38.     MAXARR="${5}";
  39.     i=1;
  40.     c=0;
  41.     f=0;
  42.     while true;
  43.     do
  44.         if [[ ${6} == "y" ]];then
  45.             CURL=$(timeout 5 curl -s "https://www.bing.com/search?q=${DORK}+%22${WORD}%22&first=${i}" | grep -Po '<li class="b_algo"><h2><a href="\K.*?(?=")' | sed 's/:\/\//[]/g' | sed 's/\// /g' | sed 's/\[\]/:\/\//g' | awk '{print $1"/"}')
  46.         else
  47.             CURL=$(timeout 5 curl -s "https://www.bing.com/search?q=${DORK}+%22${WORD}%22&first=${i}" | grep -Po '<li class="b_algo"><h2><a href="\K.*?(?=")')
  48.         fi
  49.         for SITE in ${CURL};
  50.         do
  51.             if [[ -z $(cat ${TMPRES} | grep "${SITE}") ]];then
  52.                 ((c++));
  53.                 echo "${SITE}" >> ${TMPRES}
  54.                 echo "INFO: *${SITE}";
  55.             else
  56.                 ((f++));
  57.                 echo -ne "";
  58.             fi
  59.             if [[ ${f} -eq ${MAXCPN} ]];then
  60.                 echo "D" >> BINGJOB.FILE;
  61.                 echo "INFO: [$(cat BINGJOB.FILE | wc -l)/${MAXARR}] Jobs Remaining";
  62.                 return 0;
  63.             fi
  64.         done
  65.         let "i=i+10";
  66.     done
  67. }
  68.  
  69. TMPRES="BINGRESULTS.TMP";
  70.  
  71. if [[ -f "${TMPRES}" ]];then
  72.     rm ${TMPRES}
  73.     touch ${TMPRES};
  74. fi
  75.  
  76. echo -ne "\n + Insert dork     : ";
  77. read DORK;
  78. echo -ne " + Save to file    : ";
  79. read FILE;
  80. echo -ne " + Domain-only [y] : ";
  81. read DMNONLY;
  82. echo "";
  83.  
  84. for WORD in "${JOBS[@]}";
  85. do
  86.     doBing "${DORK}" "${WORD}" "${TMPRES}" "${MAXDUP}" "${#JOBS[@]}" "${DMNONLY}"
  87. done
  88.  
  89. if [[ -z ${FILE} ]];then
  90.     FILE="bing-default.lst";
  91. fi
  92.  
  93. cat ${TMPRES} | sort | uniq >> ${FILE}
  94. echo "[DONE] Domains at ${FILE} with total $(cat ${FILE} | wc -l) lines.";
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top