Shellsec

Fuld version: Joomla Version Checker
Du ser lige nu en skrabet udgave af vores indhold. Se den fulde version med ordentlig formatering.
[Billede: 13765600041248_joomla-version-checker1.png]


PHP kode:
#!/bin/bash
# Red V!per Joomla Version Checker 
# Coded By Red H4t V!per
# Tnx 2 : Pawel Frankowski

url="$1"

Usage()
{
echo 
""
echo "# ***************************************************************************​​****​*********************#"
echo "# Usage : Red V!per Joomla Version Checker <target> *#"
echo "# Help : -h && --help : Show This Menu *#"
echo "# RunScript : Give Permision to script and run it !! *#"
echo "# Example : ./script.sh [url]www.example.com/joomla/[/url] *#"
echo "# ***************************************************************************​​****​#"
echo ""
exit
}

Check_Arguments()
{
if [ -
"$url] || [ "$url== "-h" ] || [ "$url== "--help" ]; then
Usage
;
exit
fi
}

Check_Joomla_Version()
{
clear
i
=0
echo -'\E[32m'"[*] Start Check ..."tput sgr0
echo -'\E[32m'"[*] Testing method ($i) ..."tput sgr0

wget 
-"$url/templates/system/css/system.css" 

Version=`cat system.css | grep "OpenID icon style"`
if [ -
"$Version]; then
let i
=$i+1
echo -'\E[32m'"[*] Testing method ($i) ..."tput sgr0
sleep 0.5
else
echo -
'\E[32m'"[*] Found : $url (joomla) Version is 1.5 "tput sgr0
echo -'\E[32m'"[*] Finish ..."tput sgr0
exit
fi

version
=`cat system.css | grep "2011-01-09 02:40:25Z ian"`
if [ -
"$Version]; then
let i
=$i+1
echo -'\E[32m'"[*] Testing method ($i) ..."tput sgr0
sleep 0.5
else
echo -
'\E[32m'"[*] Found : $url (joomla) Version is 1.6 "tput sgr0
echo -'\E[32m'"[*] Finish ..."tput sgr0
exit
fi

version
=`cat system.css | grep "2011-05-11 01:10:29Z dextercowley"`
if [ -
"$Version]; then
let i
=$i+1
echo -'\E[32m'"[*] Testing method ($i) ..."tput sgr0
sleep 0.5
else
echo -
'\E[32m'"[*] Found : $url (joomla) Version is 1.7 "tput sgr0
echo -'\E[32m'"[*] Finish ..."tput sgr0
exit
fi

version
=`cat system.css | grep "2012 Open Source Matters"`
if [ -
"$Version]; then
let i
=$i+1
echo -'\E[32m'"[*] Testing method ($i) ..."tput sgr0
sleep 0.5
else
echo -
'\E[32m'"[*] Found : $url (joomla) Version is 2.5 "tput sgr0
echo -'\E[32m'"[*] Finish ..."tput sgr0
exit
fi

wget 
-"$url/media/system/js/mootools-more.js" 

Version=`cat mootools-more.js | grep "MooTools={version:"`
if [ -
"$Version]; then
let i
=$i+1
echo -'\E[32m'"[*] Testing method ($i) ..."tput sgr0
sleep 0.5
else
echo -
'\E[32m'"[*] Found : $url (joomla) Version is 1.5 "tput sgr0
echo -'\E[32m'"[*] Finish ..."tput sgr0
exit
fi

Version
=`cat mootools-more.js | grep "1.3.0.1"`
if [ -
"$Version]; then
let i
=$i+1
echo -'\E[32m'"[*] Testing method ($i) ..."tput sgr0
sleep 0.5
else
echo -
'\E[32m'"[*] Found : $url (joomla) Version is 1.6 "tput sgr0
echo -'\E[32m'"[*] Finish ..."tput sgr0
exit
fi

Version
=`cat mootools-more.js | grep "1.3.2.1"`
if [ -
"$Version]; then
let i
=$i+1
echo -'\E[32m'"[*] Testing method ($i) ..."tput sgr0
sleep 0.5
else
echo -
'\E[32m'"[*] Found : $url (joomla) Version is 1.7 "tput sgr0
echo -'\E[32m'"[*] Finish ..."tput sgr0
exit
fi

Version
=`cat mootools-more.js | grep "1.4.0.1"`
if [ -
"$Version]; then
let i
=$i+1
echo -'\E[32m'"[*] Testing method ($i) ..."tput sgr0
sleep 0.5
else
echo -
'\E[32m'"[*] Found : $url (joomla) Version is 2.5.6 or 3.0 alpha 2 "tput sgr0
echo -'\E[32m'"[*] Finish ..."tput sgr0
exit
fi

wget 
-"$url/language/en-GB/en-GB.ini" 

Version=`cat en-GB.ini | grep "11391 2009-01-04 13:35:50Z ian"`
if [ -
"$Version]; then
let i
=$i+1
echo -'\E[32m'"[*] Testing method ($i) ..."tput sgr0
sleep 0.5
else
echo -
'\E[32m'"[*] Found : $url (joomla) Version is 1.5.26 "tput sgr0
echo -'\E[32m'"[*] Finish ..."tput sgr0
exit
fi

Version
=`cat en-GB.ini | grep "20196 2011-01-09 02:40:25Z ian"`
if [ -
"$Version]; then
let i
=$i+1
echo -'\E[32m'"[*] Testing method ($i) ..."tput sgr0
sleep 0.5
else
echo -
'\E[32m'"[*] Found : $url (joomla) Version is 1.6.0 "tput sgr0
echo -'\E[32m'"[*] Finish ..."tput sgr0
exit
fi

Version
=`cat en-GB.ini | grep "2011-03-18 16:42:30Z infograf768"`
if [ -
"$Version]; then
let i
=$i+1
echo -'\E[32m'"[*] Testing method ($i) ..."tput sgr0
sleep 0.5
else
echo -
'\E[32m'"[*] Found : $url (joomla) Version is 1.6.5 or 1.7.1 "tput sgr0
echo -'\E[32m'"[*] Finish ..."tput sgr0
exit
fi

Version
=`cat en-GB.ini | grep "22183 2011-09-30 09:04:32Z infograf768"`
if [ -
"$Version]; then
let i
=$i+1
echo -'\E[32m'"[*] Testing method ($i) ..."tput sgr0
sleep 0.5
else
echo -
'\E[32m'"[*] Found : $url (joomla) Version is 1.7.3 or 1.7.5 "tput sgr0
echo -'\E[32m'"[*] Finish ..."tput sgr0
exit
fi

Version
=`cat en-GB.ini | grep "<version>2.5.0"`
if [ -
"$Version]; then
let i
=$i+1
echo -'\E[32m'"[*] Testing method ($i) ..."tput sgr0
sleep 0.5
else
echo -
'\E[32m'"[*] Found : $url (joomla) Version is 2.5.0 -> 2.5.4 "tput sgr0
echo -'\E[32m'"[*] Finish ..."tput sgr0
exit
fi

Version
=`cat en-GB.ini | grep "<version>2.5.5"`
if [ -
"$Version]; then
echo -'\E[32m'"[*] Shit :( Not Found ..."tput sgr0
sleep 0.5
else
echo -
'\E[32m'"[*] Found : $url (joomla) Version is 2.5.5 or 2.5.6 "tput sgr0
echo -'\E[32m'"[*] Finish ..."tput sgr0
exit
fi
}

pre_remove()
{
rm -rf system.css*
rm -rf mootools-more.js*
rm -rf en-GB.ini*
}

main()
{
pre_remove;
Check_Arguments;
Check_Joomla_Version;
}

main
I'll try it out, thanks for sharing! Did you code it yourself?
Hvad er det kodet i enlig? efter som jeg ikke er den bedste til det :)
(15-08-2013, 21:01)Benka Skrev: [ -> ]Hvad er det kodet i enlig? efter som jeg ikke er den bedste til det :)

Linux bash script du kan altid se det i starten. Her starter den i #!/bin/bash python kan starte med #!/usr/bin/python

Den kigger efter versionen her:

wget -q "$url/templates/system/css/system.css"

Version=`cat system.css | grep "OpenID icon style"`

og printer (echo) det ud i terminalen med argumenterne IF som tjekker versionerne i forhold til "ID" som findes i den fil
Doe's it only work up to er certain version? I can't seem to find the version on any of the sites I tryed...
(17-08-2013, 21:00)Spagnum Skrev: [ -> ]Doe's it only work up to er certain version? I can't seem to find the version on any of the sites I tryed...

Ja, det ser ud til, at den stopper med at prøve efter version 2.5.5 - desværre er det nogle ret gamle versioner, da de nyeste er 2.5.14 og 3.1.5, så mon ikke de fleste af dem, du har prøvet, har opdateret deres core?

Men det betyder jo så, at de er nyere end 2.5.5, som man muligvis også kan bruge til noget
@PhasmaX - det lyder meget sandsynligt