La source:
#!/bin/bash
#
# ---------------------------------
# Server joomla Finder
# Licence : Linux
# ---------------------------------
#
# Title : Server Joomla Finder
# Code : Bash
# Author : RedH4t.Viper
# Email : RedH4t.Viper@Gmail.com , RedH4t.Viper@yahoo.com
# Released : 2013 04 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=0
how_many=1
IP_SERVER=$1
single_page=
last_page_check=
banner()
{
echo " _ _ __ _ _ "
echo " (_) | | / _(_) | | "
echo " _ ___ ___ _ __ ___ | | __ _ | |_ _ _ __ __| | ___ _ __ "
echo " | |/ _ \ / _ \| '_ \ _ \| |/ _\ | | _| | \_ \ / _\ |/ _ \ __| "
echo " | | (_) | (_) | | | | | | | (_| | | | | | | | | (_| | __/ | "
echo " | |\___/ \___/|_| |_| |_|_|\__,_| |_| |_|_| |_|\__,_|\___|_| "
echo " _/ | "
echo " |__/ "
echo " "
}
Usage()
{
echo ""
echo "# ****************************************************************************************************#"
echo "# Usage : Server Joomla 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 Joomla Web Sites Will be Save at finded.txt \e[0m"
echo -e "\e[1;35m[*] Searching Joomla Web Sites 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+%27index.php?option=com_%27&qs=n&pq=ip%3a$IP+%27index.php?option=com_%27&sc=8-26&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 "com_" >> /dev/null;check=$?
if [ $check -eq 0 ]
then
echo "$domain" >>IndexDomain.txt
fi
done
cat IndexDomain.txt | cut -d '?' -f 1 | awk '{gsub("index.php","")}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 joom in `cat finded.txt`
do
echo -e "\e[1;32m[*] $joom \e[0m"
done
rm -rf domains.txt
rm -rf alldomain_bing.txt
rm -rf IndexDomain.txt
}
main()
{
banner ;
Check_Arguments;
Searching_Jce;
}
main;
No hay comentarios:
Publicar un comentario