Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # "***********************************************************************"
- # "* In The Name Of ALLAH *"
- # "* IrIsT Reverse IP Domain Checker *"
- # "* www.IrIsT.Ir *"
- # "* Coded By : Beni_Vanda *"
- # "* Gr33tz : Am!r ,C0dex ,B3HZ4D ,TaK.FaNaR ,0x0ptim0us ,MR.F@RDIN *"
- # "* skote_vahshat ,M.R.S.CO ,Net.W0lf , IR Anonymous, joker_s *"
- # "* && All Turkish/Iranian/Kurdish Hackerz *"
- # "* [email protected] *"
- # "***********************************************************************"
- #Used This servers
- #http://www.bing.com
- #http://www.my-ip-neighbors.com/
- #http://ip.kenh12.com/Reverse-IP-Lookup-DNS-Domain/
- F_ARG=$1
- IP=
- page=0
- last_page_check=
- how_many=1
- single_page=
- function Usage()
- {
- echo ""
- echo "# **************************************************************************************#"
- echo "# Usage : IrIsT-Reverse-IP.sh [IP/Domain] *#"
- echo "# Help : -h && --help : Show This Menu *#"
- echo "# RunScript : give permision to script and run it ./IrIsT-Reverse-IP.sh <IP> *#"
- echo "# **************************************************************************************#"
- echo ""
- }
- # check for arguments
- if [ -z "$F_ARG" ] || [ "$F_ARG" == "-h" ] || [ "$F_ARG" == "--help" ]; then
- Usage;
- exit 1
- fi
- # check IP
- if [ `echo "$F_ARG" | egrep "(([0-9]+\.){3}[0-9]+)|\[[a-f0-9:]+\]"` ]; then
- IP="$F_ARG"
- else
- IP=`resolveip -s "$F_ARG"`
- if [ "$?" != 0 ]; then
- echo "Error: cannot resolve $F_ARG to an IP"
- exit
- fi
- fi
- # Check Sever Status
- ping -c 3 $IP
- if [ $? -ne 0 ]
- then
- echo "Server $IP is down :| >> Program Exit "
- exit 1
- fi
- echo ""
- echo "Server $IP Status = On Going to Reverse IP "
- echo ""
- echo "Reversed Domain will be Store at all_server_reversed.txt ..."
- echo "starting ..."
- echo "[*] now going to use neighbors server ... "
- echo "[*] Trying ..."
- url_neighbors="http://www.my-ip-neighbors.com/?domain=$IP"
- wget -q -O my-ip-neighbors.php "$url_neighbors"
- cat my-ip-neighbors.php | egrep -o '<td class="action" target="_blank"><a href="http://whois.domaintools.com/[^"]+' | cut -d '/' -f4 | sort | uniq >> whois_neighbors.txt
- echo "[*] now going to use ip-kenh12 server ... "
- echo "[*] Trying ..."
- url_kenh12="http://ip.kenh12.com/Reverse-IP-Lookup-DNS-Domain/$IP.html"
- wget -q -O my-ip-kenh12.php "$url_kenh12"
- cat my-ip-kenh12.php | egrep -o "gif' alt=[^>]+" | cut -d '=' -f2 | sed '/www./s///g' | sort | uniq >> whois_kenh12.txt
- echo "[*] now going to use bing server ... "
- echo "[*] Trying ..."
- while [ -z "$last_page_check" ] && [ -n "$how_many" ] && [ -z "$single_page" ]; do
- url="http://www.bing.com/search?q=ip%3A$IP&go=&qs=n&first=${page}0&FORM=PERE"
- out=`mktemp -p /tmp -t IrIsT_Reverse_IP_Bing.tmp.XXXXXX`
- wget -q -O "$out" "$url"
- last_page_check=`egrep -o '<span class="sb_count" id="count">[0-9]+-([0-9]+) of (\1)' $out`
- # if no results are found, how_many is empty and the loop will exit
- how_many=`egrep -o '<span class="sb_count" id="count">[^<]+' $out|cut -d '>' -f 2|cut -d ' ' -f 1-3`
- # check for a single page of results
- single_page=`egrep -o '<span class="sb_count" id="count">[0-9] results' $out`
- cat "$out"| egrep -o "<h3><a href=\"[^\"]+" $out |cut -d '"' -f 2 >> alldomain_bing.txt
- # rm -f "$out"
- let page=$page+1
- done
- cat alldomain_bing.txt | cut -d '/' -f 3 | tr '[:upper:]' '[:lower:]' | sed '/www./s///g' | sort | uniq >> whois_bing.txt
- rm alldomain_bing.txt ;
- # insert whoised domain at all_server_reversed txt
- for line_bing in `cat whois_bing.txt`
- do
- echo "$line_bing" >> all_server_reversed.txt
- done
- for line_neighbors in `cat whois_neighbors.txt`
- do
- echo "$line_neighbors" >> all_server_reversed.txt
- done
- for line_kenh12 in `cat whois_kenh12.txt`
- do
- echo "$line_kenh12" >> all_server_reversed.txt
- done
- rm whois_bing.txt;
- rm whois_neighbors.txt;
- rm whois_kenh12.txt;
- rm my-ip-neighbors.php;
- rm my-ip-kenh12.php;
- sort all_server_reversed.txt | uniq
- found_N=`wc -l all_server_reversed.txt | sed 's/all_server_reversed.txt//'`
- echo "Found $found_N Host On $IP server :)"
Add Comment
Please, Sign In to add comment