daily pastebin goal
79%
SHARE
TWEET

Accurate Reverse IP

zerobyte-id Sep 13th, 2018 (edited) 340 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. # Name     : Accurate Reverse IP
  3. # Type     : Enumeration
  4. # Vendor   : http://zerobyte.id/
  5. # Version  : 2.0
  6. #
  7. # Installation :
  8. #   wget -O reverseip.sh https://pastebin.com/raw/cArj07Sy;sed -i -e 's/\r$//' reverseip.sh;chmod +x reverseip.sh;
  9. # Run :
  10. #   ./reverseip.sh
  11.  
  12. echo "     ____            ________  ";
  13. echo "    / __ \___ _   __/  _/ __ \ ";
  14. echo "   / /_/ / _ \ | / // // /_/ / ";
  15. echo "  / _, _/  __/ |/ // // ____/  ";
  16. echo " /_/ |_|\___/|___/___/_/ V 2.0 ";
  17. echo "                By ZeroByte.ID "
  18. echo "----- Accurate Reverse IP -----";
  19. echo "";
  20.  
  21. echo -ne "[?] Input Site : ";
  22. read TARGET;
  23.  
  24. REALIP=$(dig +short ${TARGET} | grep -oE "\b((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b" | head -1);
  25.  
  26. echo "INFO: address $REALIP"
  27. if [[ -z ${REALIP} ]];then
  28.     echo "ERROR: ${TARGET} invalid domain";
  29.     exit;
  30. fi
  31.  
  32. if [[ -f ./accurev-ip/${TARGET}_SITES.LST ]];then
  33.     echo "INFO: ${TARGET} had scanned";
  34.     echo "INFO: file locate (./accurev-ip/${TARGET}.done)"
  35.     echo -ne "[?] Want to try scan again? [y/n] : ";
  36.     read CHS;
  37.     if [[ ${CHS} == "n" ]];then
  38.         exit;
  39.     fi
  40.     rm -f ./accurev-ip/${TARGET}.done
  41. fi
  42.  
  43. if [[ ! -d "accurev-ip" ]];then
  44.     mkdir accurev-ip
  45. fi
  46.  
  47. function cleanUp() {
  48.     if [[ -f REVERSEIP.TEMP ]];then
  49.         rm REVERSEIP.TEMP;
  50.     fi
  51.     if [[ -f REVERSEIP2.TEMP ]];then
  52.         rm REVERSEIP2.TEMP;
  53.     fi
  54.     if [[ -f REVERSEIP3.TEMP ]];then
  55.         rm REVERSEIP3.TEMP;
  56.     fi
  57. }
  58. cleanUp;
  59.  
  60. function yougetsignal() {
  61.     WEB="${1}"
  62.     CURL=$(curl -s -F "remoteAddress=${WEB}" "https://domains.yougetsignal.com/domains.php");
  63.     IP=$(echo ${CURL} | grep -Po 'remoteIpAddress":"\K.*?(?=")');
  64.     echo "INFO: Grab sites from yougetsignal.com"
  65.     i=0;
  66.     for SITE in $(echo ${CURL} | grep -Po '\["\K.*?(?=",)');
  67.     do
  68.         ((i++))
  69.         echo "${SITE}" >> REVERSEIP.TEMP;
  70.     done
  71.     echo "INFO: Total ${i} sites grabbed";
  72. }
  73.  
  74. function viewdns() {
  75.     WEB="${1}";
  76.     echo "INFO: Grab sites from viewdns.info"
  77.     i=0;
  78.     for SITE in $(curl -s "https://viewdns.info/reverseip/?host=${WEB}&t=1" | grep '</td><td' | sed 's|</td><td|\n|g' | sed 's| <td>| |g' | awk '{print $2}' | sed  '/^$/d' | sed '1d' | sed '1d');
  79.     do
  80.         ((i++))
  81.         echo "${SITE}" >> REVERSEIP.TEMP;
  82.     done
  83.     echo "INFO: Total ${i} sites grabbed";
  84. }
  85.  
  86. function hackertarget() {
  87.     WEB="${1}";
  88.     echo "INFO: Grab sites from hackertarget.com"
  89.     i=0;
  90.     for SITE in $(curl -s -d "theinput=${WEB}&thetest=reverseiplookup&name_of_nonce_field=d210302267&_wp_http_referer=%2Freverse-ip-lookup%2F" "https://hackertarget.com/reverse-ip-lookup/" | sed -n -e '/<pre id="formResponse">/,/<\/pre>/p' | sed 's/<pre id="formResponse">/LINEPALINGATAS\n/g' | grep -v LINEPALINGATAS | grep -v '</pre>');
  91.     do
  92.         ((i++))
  93.         echo "${SITE}" >> REVERSEIP.TEMP;
  94.     done
  95.     echo "INFO: Total ${i} sites grabbed";
  96. }
  97.  
  98. yougetsignal ${TARGET}
  99. viewdns ${TARGET}
  100. hackertarget ${TARGET}
  101.  
  102. cat REVERSEIP.TEMP | sort -n | uniq >> REVERSEIP2.TEMP
  103. echo "INFO: Total unique sites $(cat REVERSEIP2.TEMP | wc -l)";
  104.  
  105. function webchk() {
  106.     WEB="${1}";
  107.     ADDR=$(dig +short ${WEB} | grep -oE "\b((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b" | head -1);
  108.     if [[ ! -z ${ADDR} ]]
  109.     then
  110.         echo "INFO: ${WEB} - ${ADDR}";
  111.         echo "${ADDR} ${WEB}" >> REVERSEIP3.TEMP;
  112.     else
  113.         echo "ERROR: ${WEB} invalid domain";
  114.         return 1;
  115.     fi
  116. }
  117.  
  118. for WEB in $(cat REVERSEIP2.TEMP);
  119. do
  120.     webchk "${WEB}" &
  121. done
  122. wait
  123.  
  124. cat REVERSEIP3.TEMP | grep "${REALIP}" | awk '{print $2}' >> ./accurev-ip/${TARGET}.done;
  125. echo "INFO: Total $(cat ./accurev-ip/${TARGET}.done | wc -l) sites same with ${TARGET}'s server";
  126. echo "DONE: Saved ./accurev-ip/${TARGET}.done";
  127. cleanUp;
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