May 052011
 

So on my backtrack installation and also on my gentoo laptop with the same directory structure, I keep everything up to date that is in subversion or similar using a script.  Here is the script…..

By the way, I don’t have the identical toolset as backtrack.  I have added a lot of things, and I generally try to get the subversion versions of them if possible.  The easiest way to find what software or applications you have in the /pentest directory is to do a scan for .svn folder.  If it exists, you can add that application to this script.

This will get you a list of all the svn folders:

$ sudo find /pentest -maxdepth 3 -name .svn

The you can cd to the directory and do “sudo svn info” to get the url to update from.

Following is the script for doing the updates on my system, upated 2011-07-19

#!/bin/bash
 
# sudo svn updater by ed wiget
# updates pentest tools to latest subversion revisions
#  
 
log="/tmp/svn-update-`date +%Y%m%d`.txt"
echo "" >> $log
echo "checking......" >> $log
cd /pentest/database/sqlmap-dev
echo "sqlmap......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info https://svn.sqlmap.org/sqlmap | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then  
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn up --trust-server-cert --non-interactive
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/database/sqlninja
echo "" >> $log
echo "sqlninja......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info https://sqlninja.svn.sourceforge.net/svnroot/sqlninja | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/enumeration/nipper-read-only
echo "" >> $log
echo "nipper......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://nipper-ng.googlecode.com/svn | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/enumeration/fierce2
echo "" >> $log
echo "fierce2......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info https://svn.assembla.com/svn/fierce | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/exploits/armitage
echo "" >> $log
echo "armitage......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://armitage.googlecode.com/svn | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/exploits/set
echo "" >> $log
echo "set......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://svn.secmaniac.com/social_engineering_toolkit | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then  
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/exploits/framework2
echo "" >> $log
echo "metasploit framework2......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://metasploit.com/svn/framework2/trunk | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
#cd /pentest/exploits/framework3
#echo "" >> $log
#echo "metasploit framework3......" >> $log
#   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
#   newsvn=$(sudo svn info http://metasploit.com/svn/framework3/trunk | grep "Revision" | cut -c11-)
#      if [ "$newsvn" == "$oldsvn" ] ; then
#         echo "You are up to date already (SVN $newsvn)" >> $log
#      else
#         sudo svn update
#         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
#         if [ "$newsvn" == "$upsvn" ] ; then
#            echo "Updated Successfully to    (SVN $upsvn)" >> $log
#         fi
#      fi
 
echo "" >> $log
echo "Updating metasploit framework3...." >> $log
cd /pentest/exploits/framework3/msf3
sudo ./msfupdate 
 
cd /pentest/exploits/exploitdb
echo "" >> $log
echo "exploitdb......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info svn://www.exploit-db.com/exploitdb | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/exploits/fasttrack
echo "" >> $log
echo "fasttract......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://svn.secmaniac.com/fasttrack | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/scanners/nikto
echo "" >> $log
echo "nikto......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://svn2.assembla.com/svn/Nikto_2/trunk | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/sniffers/dedected
echo "" >> $log
echo "dedected......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info https://dedected.org/svn | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/telephony/dedected
echo "" >> $log
echo "dedected......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info https://dedected.org/svn | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/telephony/warvox
echo "" >> $log
echo "warvox......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://metasploit.com/svn/warvox/trunk | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/voip/sipvicious
echo "" >> $log
echo "subvicious......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://sipvicious.googlecode.com/svn/trunk | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
#cd /pentest/voip/ucsniff
#sudo svn update
 
cd /pentest/web/beef-ng
echo "" >> $log
echo "beef-ng......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info https://beef.googlecode.com/svn | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/web/cal9000
echo "" >> $log
echo "cal9000......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://owasp-code-central.googlecode.com/svn | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/web/ProxyStrike
echo "" >> $log
echo "ProxyStrike......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://proxystrike.googlecode.com/svn/trunk | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/web/w3af
echo "" >> $log
echo "w3af......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info https://w3af.svn.sourceforge.net/svnroot/w3af/trunk | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/web/waffit
echo "" >> $log
echo "waffit......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://waffit.googlecode.com/svn/trunk | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/web/xssf-read-only
echo "" >> $log
echo "xssf-read-only......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://xssf.googlecode.com/svn | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
#cd /pentest/web/wfuzz/wordlists/vulns/CVS
#   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
#   newsvn=$(sudo svn info
#svn+ssh://192.168.1.100/var/edge-repo/edgesecurity/wfuzz/trunk/wordlists/vulns/CVS | grep "Revision" | cut -c11-)
#      if [ "$newsvn" == "$oldsvn" ] ; then
#         echo "You are up to date already (SVN $newsvn)" >> $log
#      else
#         sudo svn update
#         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
#         if [ "$newsvn" == "$upsvn" ] ; then
#            echo "Updated Successfully to    (SVN $upsvn)" >> $log
#         fi
#      fi
 
#cd /pentest/web/dharmaencoder
 
cd /pentest/web/fimap-new
echo "" >> $log
echo "fimap-new......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://fimap.googlecode.com/svn/trunk/src | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/web/wpscan-read-only
echo "" >> $log
echo "wpscan......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://wpscan.googlecode.com/svn | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/wireless/aircrack-ng
echo "" >> $log
echo "aircrack-ng......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://trac.aircrack-ng.org/svn/trunk | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/wireless/giskismet
echo "" >> $log
echo "giskismet......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info https://my-svn.assembla.com/svn/giskismet/trunk | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/wireless/kismet-newcore
echo "" >> $log
echo "ksimet-newcore......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info https://www.kismetwireless.net/code/svn/trunk | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
            echo "compiling kismet.....please wait" >> $log
            cd /pentest/wireless/kismet-newcore
            sudo ./configure
            sudo make dep
            sudo make
            echo "kismet-newcore is now compiled....." >> $log
            echo "we are not doing make install on kismet-newcore......"
         fi
      fi
 
cd /pentest/wireless/airdrop-ng
echo "" >> $log
echo "airdrop-ng......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://trac.aircrack-ng.org/svn/trunk/scripts/airdrop-ng | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/wireless/airgraph-ng
echo "" >> $log
echo "airgraph-ng......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://trac.aircrack-ng.org/svn/trunk/scripts/airgraph-ng | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
 
cd /pentest/wireless/wepbuster
echo "" >> $log
echo "wepbuster......" >> $log
   oldsvn=$(sudo svn info | grep "Revision" | cut -c11-)
   newsvn=$(sudo svn info http://wepbuster.googlecode.com/svn/trunk | grep "Revision" | cut -c11-)
      if [ "$newsvn" == "$oldsvn" ] ; then
         echo "You are up to date already (SVN $newsvn)" >> $log
      else
         sudo svn update
         upsvn=$(sudo svn info | grep "Revision" | cut -c11-)
         if [ "$newsvn" == "$upsvn" ] ; then
            echo "Updated Successfully to    (SVN $upsvn)" >> $log
         fi
      fi
echo "" >> $log