##################################################
f_sslstrip_vercheck(){
clear
f_Banner
printf "\nChecking the thoughtcrime website for the latest version of SSLStrip...\n"
#Get the installed version
installedver=$(cat /pentest/web/sslstrip/setup.py|grep version|cut -d "'" -f2)
# Change to tmp folder to keep things clean then get the index.html from thoughtcrime.com for SSLStrip
cd /tmp/
wget -q http://www.thoughtcrime.org/software/sslstrip/index.html
latestver=$(cat index.html | grep "cd sslstrip"|cut -d "-" -f2)
cd $location
vercompare=$(echo "$installedver < $latestver"|bc)
printf "\nInstalled version of SSLStrip: $installedver\n"
printf "\nLatest version of SSLStrip: $latestver\n"
if [ $vercompare == 1 ]; then
printf "\nYou have version $installedver installed, version $latestver is available.\nWould you like to install the latest version? (y/n) "
read -e sslstripupdate
sslstripupdate="$(echo ${sslstripupdate} | tr 'A-Z' 'a-z')"
if [ -z $sslstripupdate ]; then
f_Error
f_sslstrip_vercheck #may need to change so it doesn't keep grabbing website
fi
if [ $sslstripupdate == "y" ]; then
f_sslstrip-update
else
printf "\nOK, maybe next time...\n"
sleep 3
fi
else
printf "\nLooks like you're running the latest version available.\n"
sleep 5
fi
#clean up the mess
rm /tmp/index.html
f_prereqs
}
##################################################
f_sslstrip-update(){
clear
f_Banner
printf "\nThis will install SSLStrip from the thoughtcrime website, not the BackTrack repositories.\nHit return to continue or ctrl-c to cancel and return to main menu."
read $continue
mv /pentest/web/sslstrip/ /pentest/web/sslstrip-$installedver
printf "\nDownloading the tar file...\n"
cd /tmp
wget -q http://www.thoughtcrime.org/software/sslstrip/sslstrip-0.9.tar.gz
sleep 2
printf "\nInstalling the latest version of SSLStrip...\n"
tar zxvf sslstrip-$latestver.tar.gz
mv -f /tmp/sslstrip-$latestver/ /pentest/web/sslstrip/
cd $location
sleep 2
printf "\nVersion $latestver has been installed.\n"
sleep 2
#clean up the mess
rm -rf /tmp/sslstrip-$latestver
rm /tmp/sslstrip-$latestver.tar.gz
}
##################################################