Active Members Fi8sVrs Posted October 15, 2013 Active Members Report Posted October 15, 2013 This program find wordpress domains which is hosted on the same server#!/bin/bash # # --------------------------------- # Server Wordpress Finder # Licence : Linux # --------------------------------- # # Title : Server Wordpress Finder # Code : Bash # Author : RedH4t.Viper # Email : RedH4t.Viper@Gmail.com , RedH4t.Viper@yahoo.com # Released : 2013 18 June # Home : IrIsT Security Center # Thanks : IrIsT ,TBH ,kurdhackteam , 3xp1r3 , thecrowscrew # # Gr33tz : Am!r | C0dex | B3HZ4D | TaK.FaNaR | 0x0ptim0us | Skote_Vahshat | # Gr33tz : Net.W0lf | Dj.TiniVini| Mr.XHat | Black King | Devil | # Gr33tz : E2MAEN | () | M4st3r4N0nY |Turk Sever | dr.koderz | V30sharp # Gr33tz : ARTA | Mr.Zer0 | Sajjad13and11 | Silent | Smartprogrammer | # Gr33tz : x3o-1337 | rEd X | No PM | Gabby | Sukhoi Su-37 | IR Anonymous | # Gr33tz : Megatron | Zer0 | sole sad | Medrik | F@rid | And All Of IrIsT Memebrz | #------------------------------------------------------------------------------------------#page=0how_many=1IP_SERVER=$1single_page=last_page_check=banner(){echo " _ _______ ______ _ _ "echo " | | | | ___ \ | ___(_) | | "echo " | | | | |_/ / | |_ _ _ __ __| | ___ _ __ "echo " | |/\| | __/ | _| | | '_ \ / _\ |/ _ \ '__| "echo " \ /\ / | | | | | | | | (_| | __/ | "echo " \/ \/\_| \_| |_|_| |_|\__,_|\___|_| "echo " "}Usage(){ echo "" echo "# ***************************************************************************??***?*?*********************#" echo "# Usage : Server Wordpress Finder <IP/Domain> *#" echo "# Help : -h && --help : Show This Menu *#" echo "# RunScript : Give Permision to script and run it !! *#" echo "# ***************************************************************************??***?*?*********************#" echo ""}Check_Arguments(){ if [ -z "$IP_SERVER" ] || [ "$IP_SERVER" == "-h" ] || [ "$IP_SERVER" == "--help" ]; then Usage; exit fi}Searching_Jce(){ rm -rf domains.txt rm -rf alldomain_bing.txt rm -rf IndexDomain.txt if [ `echo "$IP_SERVER" | egrep "(([0-9]+\.){3}[0-9]+)|\[[a-f0-9:]+\]"` ]; then IP="$IP_SERVER" else IP=`resolveip -s "$IP_SERVER"` if [ "$?" != 0 ]; then echo -e "[-] Error: cannot resolve $IP_SERVER to an IP " fi fi echo -e "\e[1;35m[*] Finded Wordpress Web Sites Will be Save at finded.txt \e[0m" echo -e "\e[1;35m[*] Searching WP on $IP Plz W8 \e[0m" touch alldomain_bing.txt; while [ -z "$last_page_check" ] && [ -n "$how_many" ] && [ -z "$single_page" ]; do url="http://www.bing.com/search?q=ip%3a$IP+%27%2f%E2%80%8Bwp-content%2f%27&qs=n&pq=ip%3a$IP+%27%2f%E2%80%8Bwp-content%2f%27&sc=0-15&sp=-1&sk=&first=${page}1&FORM=PERE" wget -q -O domain_bing.php "$url" last_page_check=`egrep -o '<span class="sb_count" id="count">[0-9]+-([0-9]+) of (\1)' domain_bing.php` # if no results are found, how_many is empty and the loop will exit how_many=`egrep -o '<span class="sb_count" id="count">[^<]+' domain_bing.php | 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' domain_bing.php ` cat domain_bing.php | egrep -o "<h3><a href=\"[^\"]+" domain_bing.php | cut -d '"' -f 2 >> alldomain_bing.txt rm -f domain_bing.php let page=$page+1 done cat alldomain_bing.txt | awk '{gsub("http://","")}1' | awk '{gsub("https://","")}1' | sed '/www./s///g' | tr '[:upper:]' '[:lower:]' | sort | uniq >> domains.txt for domain in `cat domains.txt` do echo "$domain" | grep "wp-content" >> /dev/null;check=$? if [ $check -eq 0 ] then echo "$domain" >>IndexDomain.txt fi done#awk '{gsub("wp-content","")}1' | cat IndexDomain.txt | cut -d '/' -f 1 | sort | uniq >> finded.txt found_N=`wc -l finded.txt | sed 's/finded.txt//'` echo -e "\e[1;34m[+] Found $found_N \e[0m" for wp in `cat finded.txt` do echo -e "\e[1;32m[*] $wp \e[0m" done rm -rf domains.txt rm -rf alldomain_bing.txt rm -rf IndexDomain.txt} main() { banner ; Check_Arguments; Searching_Jce; } main; Quote