1. #!/bin/bash
  2.  
  3. #  Back|Track 4 Update Utility
  4.  
  5. #  (C)opyright 2010 Scamentology
  6. vs="1.83"
  7. clear
  8. #---License------------------------------------------------------------------------------------#
  9. #  This program is free software: you can redistribute it and/or modify it under the terms     #
  10. #  of the GNU General Public License as published by the Free Software Foundation, either      #
  11. #  version 3 of the License, or (at your option) any later version.                            #
  12. #                                                                                              #
  13. #  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;   #
  14. #  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   #
  15. #  See the GNU General Public License for more details.                                        #
  16. #                                                                                              #
  17. #  You should have received a copy of the GNU General Public License along with this program.  #
  18. #  If not, see <http://www.gnu.org/licenses/>.                                                 #
  19. #----------------------------------------------------------------------------------------------#
  20. ################################################################################################
  21. #                                                                                              #
  22. #    ~ btupdate.sh ( options ) ~                                                               #
  23. #    Updates the following...                                                                  #
  24. #    ( -d ) Run apt-get (Change variable under OS update below to disable any features)        #
  25. #    ( -o ) Openvas Plugin Sync                                                                #
  26. #    ( -m ) Metasploit                                                                         #
  27. #    ( -a ) aircrack-ng                                                                        #
  28. #    ( -e ) exploitdb                                                                          #
  29. #    ( -s ) Social Engineering Toolkit                                                         #
  30. #    ( -f ) Fasttrack                                                                          #
  31. #    ( -S ) SQLMap                                                                             #
  32. #    ( -n ) Nikto                                                                              #
  33. #    ( -N ) Nessus                                                                             #
  34. #    ( -w ) w3af                                                                               #
  35. #    ( -z ) Update everything except apt-get                                                   #
  36. #                                                                                              #
  37. #    ~Known Issues~                                                                            #
  38. #    Let me know                                                                               #
  39. #                                                                                              #
  40. #    SQLMaps SVN asks for passwords - Just keep hitting enter if you did this update           #
  41. #    !!!This program runs apt-get clean - so if you want to keep downloaded updates then       #
  42. #    change -clean="yes"- to -clean="no"-                                                      #
  43. #                                                                                              #
  44. ################################################################################################
  45.  
  46. #                 Variables
  47.  
  48. # Check for Internet Access
  49.             netcheck="yes"        # (yes/no) no = don't check for internet access
  50.  
  51. # OS Update and Upgrade Variables
  52.               update="yes"        # (yes/no) yes for Update
  53.              upgrade="yes"        # (yes/no) yes for Upgrade
  54.                  dup="yes"        # (yes/no) yes for Distribution Update
  55.              cleanup="yes"        # (yes/no) Cleanup Downloaded Packages
  56.  
  57. # Default Install Paths (Change these if your install path is different)
  58.         openvas_path="/usr/local/sbin/"                     # Openvas
  59.      framework3_path="/pentest/exploits/framework3"         # Metasploit framework 3
  60.      framework2_path="/pentest/exploits/framework2"         # Metasploit framework 2
  61.        aircrack_path="/pentest/wireless/aircrack-ng"        # Aircrack-ng
  62.       exploitdb_path="/pentest/exploits/exploitdb"          # Exploitdb
  63.             set_path="/pentest/exploits/SET"                # Social Engineering Toolkit
  64.       fasttrack_path="/pentest/exploits/fasttrack"          # Fasttrack
  65.          sqlmap_path="/pentest/database/sqlmap"             # SQLMap
  66.           nikto_path="/pentest/scanners/nikto"              # Nikto
  67.          nessus_path="/opt/nessus/sbin"                     # Nessus
  68.            w3af_path="/pentest/web/w3af"                    # w3af
  69.  
  70. # Online SVN Checks (Change these if the SVN link changes)
  71.       framework3_svn="https://www.metasploit.com/svn/framework3/trunk"
  72.       framework2_svn="https://www.metasploit.com/svn/framework2/trunk"
  73.         aircrack_svn="http://trac.aircrack-ng.org/svn/trunk"
  74.        exploitdb_svn="svn://devel.offensive-security.com/exploitdb"
  75.              set_svn="http://svn.thepentest.com/social_engineering_toolkit"
  76.        fasttrack_svn="http://svn.secmaniac.com/fasttrack"
  77.           sqlmap_svn="http://svn.sqlmap.org/sqlmap/trunk/sqlmap"
  78.             w3af_svn="https://w3af.svn.sourceforge.net/svnroot/w3af/trunk"
  79.  
  80. # Update Commands (Change these if the build design changes - or they are wrong)
  81.      openvas_command="openvas-nvt-sync"
  82.   framework3_command="svn update"
  83.   framework2_command="svn update"
  84.     aircrack_command="svn update"
  85.    exploitdb_command="svn co svn://devel.offensive-security.com/exploitdb"
  86.          set_command="./set-update"
  87.    fasttrack_command="svn update"
  88.       sqlmap_command="svn update"
  89.        nikto_command="perl nikto.pl -update"
  90.       nessus_command="./nessus-update-plugins"
  91.         w3af_command="svn update"
  92.  
  93. #-- Nothing to change below this line --------------------------------------------------
  94.  
  95. # Temporary log location
  96.                  log="/tmp/btupdate.log"
  97. # Borders
  98.              border1="echo "################################""
  99.              border2="echo "################################################################""
  100.  
  101. # Help Section
  102. function help() {
  103.    echo "(C)opyright 2010 Scamentology ~
  104. ######################################
  105. #           btupdate $vs             #
  106. # A script for updating Back|Track 4 #
  107. ######################################
  108.  
  109. Usage: update.sh [options]
  110.  
  111. Options:
  112.   -d [Dist-up]            ---  apt-get everything
  113.   -o [Openvas Plugins]    ---  apt-get everything
  114.   -m [Metasploit]         ---  Update Metasploit 2 and 3 (svn update)
  115.   -a [aircrack-ng]        ---  Update aircrack-ng, airdrop-ng and airgraph-ng
  116.   -e [exploitdb]          ---  Update exploitdb
  117.   -s [SET]                ---  Update Social Engineering Toolkit
  118.   -S [SQLMap]             ---  Update SQLMap
  119.   -f [Fasttrack]          ---  Update Fasttrack
  120.   -n [Nikto]              ---  Update Nikto
  121.   -N [Nessus]             ---  Update Nessus Plugins
  122.   -w [w3af]               ---  Update w3af
  123.   -x [Everything]         ---  Do all actions in script
  124.   -z [Everything Except]  ---  Do all actions in script except apt-get
  125.   -h [Help]               ---  Help menu
  126.  
  127. Example:
  128.   ./btupdate.sh -x              (updates everything including apt-get
  129.   ./btupdate.sh -d              (apt-get update, upgrade and dist-upgrade)
  130.   ./btupdate.sh -m -a -s -f     (updates Metasploit Aircrack-ng SET and Fasttrack)
  131.  
  132. "
  133.    exit 1
  134. }
  135. while getopts "domaesSfnNwxzh" OPTIONS; do
  136.    case ${OPTIONS} in
  137.       d ) distup="true" ;;                      # apt-get everything
  138.       o ) openvas="true" ;;                     # Openvas Plugin Sync
  139.       m ) metasploit="true" ;;                  # Update Metasploit 2 and 3 (svn co)
  140.       a ) aircrack="true" ;;                    # Update aircrack-ng and airgraph-ng
  141.       e ) exploitdb="true" ;;                   # Update exploitdb
  142.       s ) SET="true" ;;                         # Update Social Engineering Toolkit
  143.       S ) SQLMap="true" ;;                      # Update SQLMap
  144.       n ) nikto="true" ;;                       # Update Nikto plugins
  145.       N ) nessus="true" ;;                      # Update Nessus plugins
  146.       f ) fasttrack="true" ;;                   # Update Fasttrack
  147.       w ) w3af="true" ;;                        # Update w3af
  148.       x ) all="true" ;;                         # Do all actions in script
  149.       z ) allbut="true" ;;                      # Do all actions in script except apt-get
  150.       h ) help ;;                               # Help menu
  151.       * ) help ;;                               # Default
  152.    esac
  153. done
  154.  
  155. #__ If the -x switch is chosen______________________________________________
  156. if [ "$all" == "true" ] ; then
  157.       openvas="true"
  158.    metasploit="true"
  159.      aircrack="true"
  160.        distup="true"
  161.           SET="true"
  162.     exploitdb="true"
  163.     fasttrack="true"
  164.        SQLMap="true"
  165.         nikto="true"
  166.        nessus="true"
  167.          w3af="true"
  168. fi
  169. #__ If the -z switch is chosen______________________________________________
  170. if [ "$allbut" == "true" ] ; then
  171.       openvas="true"
  172.    metasploit="true"
  173.      aircrack="true"
  174.        distup="false"
  175.           SET="true"
  176.     exploitdb="true"
  177.     fasttrack="true"
  178.        SQLMap="true"
  179.         nikto="true"
  180.        nessus="true"
  181.          w3af="true"
  182. fi
  183.  
  184. echo "   (C)opyright 2010 Scamentology ~"
  185. echo "######################################"
  186. echo "#           btupdate $vs             #"
  187. echo "# A script for updating Back|Track 4 #"
  188. echo "######################################"
  189.  
  190. #__ Check if Root __________________________________________________________
  191. if [ "$(id -u)" != "0" ] ; then echo "You must be root to use Back|Track Update Utility" ; exit 1 ; fi
  192.  
  193. #__ If no choices are made _________________________________________________
  194. if [ "$all" == "" ] && [ "$openvas" == "" ] && [ "$metasploit" == "" ] && [ "$aircrack" == "" ] && [ "$distup" == "" ] && [ "$SET" == "" ] && [ "$SQLMap" == "" ] && [ "$exploitdb" == "" ] && [ "$fasttrack" == "" ] && [ "$nikto" == "" ] && [ "$nessus" == "" ] && [ "$w3af" == "" ] ; then echo "Please choose an option" ; exit 1 ; fi
  195.  
  196. #__ OS Update and Upgrade Variables ________________________________________
  197. if [ "$update" == "yes" ] ; then updatea="apt-get -y update" ; fi
  198. if [ "$upgrade" == "yes" ] ; then upgradea="apt-get -y upgrade" ; fi
  199. if [ "$dup" == "yes" ] ; then distupa="apt-get -y dist-upgrade" ; fi
  200. if [ "$cleanup" == "true" ] ; then cleana="apt-get clean" ; fi
  201.  
  202. #__  Check if Programs are Installed _______________________________________
  203. if [ -e "$framework3_path/msfconsole" ] ; then framework3_install="true" ; fi
  204. if [ -e "$framework2_path/msfconsole" ] ; then framework2_install="true" ; fi
  205. if [ -d "$aircrack_path" ] ; then aircrack_install="true" ; fi
  206. if [ -d "$exploitdb_path" ] ; then exploitdb_install="true" ; fi
  207. if [ -e "$set_path/set" ] ; then set_install="true" ; fi
  208. if [ -e "$fasttrack_path/fast-track.py" ] ; then fasttrack_install="true" ; fi
  209. if [ -e "$sqlmap_path/sqlmap.py" ] ; then sqlmap_install="true" ; fi
  210. if [ -e "$nikto_path/nikto.pl" ] ; then nikto_install="true" ; fi
  211. if [ -e "$nessus_path/nessusd" ] ; then nessus_install="true" ; fi
  212. if [ -e "$openvas_path/openvas-nvt-sync" ] ; then openvas_install="true" ; fi
  213.  
  214. #__ Checking for Internet __________________________________________________
  215. if [ "$netcheck" == "yes" ] ; then
  216.    clear
  217.    $border1
  218.    echo "#[i] Checking for internet"
  219.    $border1
  220.    for (( ; ; ))
  221.    do
  222.       ping -c 2 www.google.com >/dev/null
  223.       return_val=$?
  224.       if [ $return_val != "0" ] ; then
  225.          clear
  226.          $border2
  227.          echo "[!] Internet access: Failed..."
  228.          $border2
  229.          echo "[i] Click yes to start networking then close wicd to continue"
  230.          $border2
  231.          read -p "[?] Would you like to open WICD now? [Y/n]: "
  232.             if [[ "$REPLY" =~ ^[Yy]$ ]] ; then
  233.             wicd-gtk --no-tray
  234.          else
  235.             clear
  236.             $border1
  237.             echo "[!] No internet access available"
  238.             $border1
  239.             exit 1
  240.             fi
  241.       else
  242.          clear
  243.          $border1
  244.          echo "[i] Internet access: Success" ;
  245.          $border1
  246.          break;
  247.       fi
  248. done
  249. fi
  250. #__ Distribution and apt-get _______________________________________________
  251. if [ "$distup" == "true" ] ; then
  252.    clear
  253.    echo " -- Updating Distribution --------------------" >> $log
  254.    $border1
  255.    echo "[i] Updating Distribution..."
  256.    $border1
  257.    $updatea && $upgradea && $distupa | grep "newly installed" >> $log
  258.    $cleana
  259. fi
  260. #__ Openvas Plugins ________________________________________________________
  261. if [ "$openvas" == "true" ] ; then
  262.       if [ "$openvas_install" == "true" ] ; then
  263.       clear
  264.       $border1
  265.       echo "[i] Updating Openvas Plugins..."
  266.       $border1
  267.       echo " -- Openvas Plugins -----------------------" >> $log
  268.       $openvas_command
  269.       echo "openvas plugin sync completed" >> $log
  270.    fi
  271. fi
  272. #__ MSF Framework 3 ________________________________________________________
  273. if [ "$metasploit" == "true" ] ; then
  274.    if [ "$framework3_install" == "true" ] ; then
  275.       clear
  276.       echo " -- Framework 3 ------------------------------" >> $log
  277.       $border1
  278.       echo "[i] Updating Framework 3..."
  279.       $border1
  280.       cd $framework3_path
  281.       oldsvn=$(svn info | grep "Revision" | cut -c11-)
  282.       newsvn=$(svn info $framework3_svn | grep "Revision" | cut -c11-)
  283.       if [ "$newsvn" == "$oldsvn" ] ; then  
  284.          echo "You are up to date already (SVN $newsvn)" >> $log
  285.       else
  286.          $framework3_command
  287.          upsvn=$(svn info | grep "Revision" | cut -c11-)
  288.          if [ "$newsvn" == "$upsvn" ] ; then echo "Updated Successfully to    (SVN $upsvn)" >> $log ; fi
  289.          if [ "$newsvn" != "$upsvn" ] ; then echo "Server might be down or slow - Try again" >> $log ; fi
  290.       fi
  291.    else
  292.       echo " -- Framework 3 ------------------------------" >> $log
  293.       echo "[!] MSF 3 Not Installed in $framework3_path" >> $log
  294.    fi
  295. fi
  296. #__ MSF Framework 2 ________________________________________________________
  297. if [ "$metasploit" == "true" ] ; then
  298.    if [ "$framework2_install" == "true" ] ; then
  299.       clear
  300.       echo " -- Framework 2 ------------------------------" >> $log
  301.       $border1
  302.       echo "[i] Updating Framework 2..."
  303.       $border1
  304.       cd $framework2_path
  305.       oldsvn=$(svn info | grep "Revision" | cut -c11-)
  306.       newsvn=$(svn info $framework2_svn | grep "Revision" | cut -c11-)
  307.       if [ "$newsvn" == "$oldsvn" ] ; then  
  308.          echo "You are up to date already (SVN $newsvn)" >> $log
  309.       else
  310.          $framework2_command
  311.          upsvn=$(svn info | grep "Revision" | cut -c11-)
  312.          if [ "$newsvn" == "$upsvn" ] ; then echo "Updated Successfully to    (SVN $upsvn)" >> $log ; fi
  313.          if [ "$newsvn" != "$upsvn" ] ; then echo "Server might be down or slow - Try again" >> $log ; fi
  314.       fi
  315.    else
  316.       echo " -- Framework 2 ------------------------------" >> $log
  317.       echo "[!] MSF 2 Not Installed in $framework2_path" >> $log
  318.    fi
  319. fi
  320. #__ Aircrack-ng ____________________________________________________________
  321. if [ "$aircrack" == "true" ] ; then
  322.    if [ "$aircrack_install" == "true" ] ; then
  323.       clear
  324.       echo " -- Aircrack-ng ------------------------------" >> $log
  325.       $border1
  326.       echo "[i] Updating aircrack-ng..."
  327.       $border1
  328.       cd $aircrack_path
  329.       oldsvn=$(svn info | grep "Revision" | cut -c11-)
  330.       newsvn=$(svn info $aircrack_svn | grep "Revision" | cut -c11-) >> $log
  331.       if [ "$newsvn" == "$oldsvn" ] ; then  
  332.          echo "You are up to date already (SVN $newsvn)" >> $log
  333.       else
  334.          $aircrack_command
  335.          upsvn=$(svn info | grep "Revision" | cut -c11-)
  336.          if [ "$newsvn" == "$upsvn" ] ; then echo "Updated Successfully to    (SVN $upsvn)" >> $log ; fi
  337.          if [ "$newsvn" != "$upsvn" ] ; then echo "Server might be down or slow - Try again" >> $log ; fi
  338.       fi
  339.    else
  340.       echo " -- Aircrack-ng ------------------------------" >> $log
  341.       echo "[!] Aircrack-ng Not Installed in $aircrack_path" >> $log
  342.       echo "[i] If it is installed then change default path in script" >> $log
  343.    fi
  344. fi
  345. #__ Exploitdb ______________________________________________________________
  346. if [ "$exploitdb" == "true" ] ; then
  347.    if [ "$exploitdb_install" == "true" ] ; then
  348.       clear
  349.       echo " -- Exploitdb --------------------------------" >> $log
  350.       $border1
  351.       echo "[i] Updating Exploitdb..."
  352.       $border1
  353.       cd $exploitdb_path
  354.       oldsvn=$(svn info | grep "Revision" | cut -c11-)
  355.       newsvn=$(svn info $exploitdb_svn | grep "Revision" | cut -c11-)
  356.       if [ "$newsvn" == "$oldsvn" ] ; then  
  357.          echo "You are up to date already (SVN $newsvn)" >> $log
  358.       else
  359.          cd /pentest/exploits
  360.          rm -rf $exploitdb_path
  361.          $exploitdb_command
  362.          cd $exploitdb_path
  363.          upsvn=$(svn info | grep "Revision" | cut -c11-)
  364.          if [ "$newsvn" == "$upsvn" ] ; then echo "Updated Successfully to    (SVN $upsvn)" >> $log ; fi
  365.          if [ "$newsvn" != "$upsvn" ] ; then echo "Server might be down or slow - Try again" >> $log ; fi
  366.       fi
  367.    else
  368.       echo " -- Exploitdb --------------------------------" >> $log
  369.       echo "[!] Exploitdb Not Installed in $exploitdb_path" >> $log
  370.       echo "[i] If it is installed then change default path in script" >> $log
  371.    fi
  372. fi
  373. #__ Social Engineering Toolkit _____________________________________________
  374. if [ "$SET" == "true" ] ; then
  375.    if [ "$set_install" == "true" ] ; then
  376.       clear
  377.       echo " -- SET --------------------------------------" >> $log
  378.       $border1
  379.       echo "[i] Updating SET..."
  380.       $border1
  381.       cd $set_path
  382.       oldsvn=$(svn info | grep "Revision" | cut -c11-)
  383.       newsvn=$(svn info $set_svn | grep "Revision" | cut -c11-)
  384.       if [ "$newsvn" == "$oldsvn" ] ; then  
  385.          echo "You are up to date already (SVN $newsvn)" >> $log
  386.       else
  387.          $set_command
  388.          upsvn=$(svn info | grep "Revision" | cut -c11-)
  389.          if [ "$newsvn" == "$upsvn" ] ; then echo "Updated Successfully to    (SVN $upsvn)" >> $log ; fi
  390.          if [ "$newsvn" != "$upsvn" ] ; then echo "Server might be down or slow - Try again" >> $log ; fi
  391.       fi
  392.    else
  393.       echo " -- SET --------------------------------------" >> $log
  394.       echo "[!] SET Not Installed in $set_path" >> $log
  395.       echo "[i] If it is installed then change default path in script" >> $log
  396.    fi
  397. fi
  398. #__ Fast-track _____________________________________________________________
  399. if [ "$fasttrack" == "true" ] ; then
  400.    if [ "$fasttrack_install" == "true" ] ; then
  401.       clear
  402.       echo " -- Fasttrack --------------------------------" >> $log
  403.       $border1
  404.       echo "[i] Updating Fasttrack...  "
  405.       $border1
  406.       cd $fasttrack_path
  407.       oldsvn=$(svn info | grep "Revision" | cut -c11-)
  408.       newsvn=$(svn info $fasttrack_svn | grep "Revision" | cut -c11-)
  409.       if [ "$newsvn" == "$oldsvn" ] ; then  
  410.          echo "You are up to date already (SVN $newsvn)" >> $log
  411.       else
  412.          $fasttrack_command
  413.          upsvn=$(svn info | grep "Revision" | cut -c11-)
  414.          if [ "$newsvn" == "$upsvn" ] ; then echo "Updated Successfully to    (SVN $upsvn)" >> $log ; fi
  415.          if [ "$newsvn" != "$upsvn" ] ; then echo "Server might be down or slow - Try again" >> $log ; fi
  416.       fi
  417.    else
  418.       echo " -- Fasttrack --------------------------------" >> $log
  419.       echo "[!] Fasttrack Not Installed in $fasttrack_path" >> $log
  420.       echo "[i] If it is installed then change default path in script" >> $log
  421.    fi
  422. fi
  423. #__ SQLMap _________________________________________________________________
  424. if [ "$SQLMap" == "true" ] ; then
  425.    if [ "$sqlmap_install" == "true" ] ; then
  426.       clear
  427.       echo " -- SQLMap -----------------------------------" >> $log
  428.       $border1
  429.       echo "[i] Updating SQLMap...      "
  430.       $border1
  431.       cd $sqlmap_path
  432.       oldsvn=$(svn info | grep "Revision" | cut -c11-)
  433.       newsvn=$(svn info $sqlmap_svn | grep "Revision" | cut -c11-)
  434.       if [ "$newsvn" == "$oldsvn" ] ; then  
  435.          echo "You are up to date already (SVN $newsvn)" >> $log
  436.       else
  437.          $sqlmap_command
  438.          upsvn=$(svn info | grep "Revision" | cut -c11-)
  439.          if [ "$newsvn" == "$upsvn" ] ; then echo "Updated Successfully to    (SVN $upsvn)" >> $log ; fi
  440.          if [ "$newsvn" != "$upsvn" ] ; then echo "Server might be down or slow - Try again" >> $log ; fi
  441.       fi
  442.    else
  443.       echo " -- SQLMap -----------------------------------" >> $log
  444.       echo "[!] SQLMap Not Installed in $sqlmap_path" >> $log
  445.       echo "[i] If it is installed then change default path in script" >> $log
  446.    fi
  447. fi
  448. #__ Nikto __________________________________________________________________
  449. if [ "$nikto" == "true" ] ; then
  450.    if [ "$nikto_install" == "true" ] ; then
  451.       clear
  452.       echo " -- Nikto ------------------------------------" >> $log
  453.       $border1
  454.       echo "[i] Updating Nikto...  "
  455.       $border1
  456.       cd $nikto_path
  457.       $nikto_command | awk -v line=1 'NR == line { print $0 }'  >> $log
  458.    else
  459.       echo " -- Nikto -----------------------------------" >> $log
  460.       echo "[!] Nikto Not Installed in $nikto_path" >> $log
  461.       echo "[i] If it is installed then change default path in script" >> $log
  462.    fi
  463. fi
  464. #__ Nessus _________________________________________________________________
  465. if [ "$nessus" == "true" ] ; then
  466.    if [ "$nessus_install" == "true" ] ; then
  467.       clear
  468.       echo " -- Nessus -----------------------------------" >> $log
  469.       $border1
  470.       echo "[i] Updating Nessus...  "
  471.       $border1
  472.       cd $nessus_path
  473.       $nessus_command | awk -v line=2 'NR == line { print $0 }'  >> $log
  474.    else
  475.       echo " -- Nessus -----------------------------------" >> $log
  476.       echo "[!] Nessus Not Installed in $nessus_path" >> $log
  477.       echo "[i] If it is installed then change default path in script" >> $log
  478.    fi
  479. fi
  480. #__ w3af ___________________________________________________________________
  481. if [ "$w3af" == "true" ] ; then
  482.    clear
  483.    echo " -- w3af -------------------------------------" >> $log
  484.    $border1
  485.    echo "[i] Updating w3af..."
  486.    $border1
  487.    cd $w3af_path
  488.    oldsvn=$(svn info | grep "Revision" | cut -c11-)
  489.    newsvn=$(svn info $w3af_svn | grep "Revision" | cut -c11-)
  490.    if [ "$newsvn" == "$oldsvn" ] ; then  
  491.       echo "You are up to date already (SVN $newsvn)" >> $log
  492.    else
  493.       $w3af_command
  494.       upsvn=$(svn info | grep "Revision" | cut -c11-)
  495.       if [ "$newsvn" == "$upsvn" ] ; then echo "Updated Successfully to    (SVN $upsvn)" >> $log ; fi
  496.       if [ "$newsvn" != "$upsvn" ] ; then echo "Server might be down or slow - Try again" >> $log ; fi
  497.    fi
  498. fi
  499. clear
  500. $border2
  501. echo " Update report for $(date)"
  502. $border2
  503. cat $log
  504. $border2
  505. sleep 1
  506. rm -f $log
  507. exit 1