hier ein ganz hilfreiches msf3 update-script (dirty, aber tut seinen Job ;-)
Code:
#!/bin/bash
cd /opt/metasploit3/msf3
if [ "$(svn info |grep 'Date:' |cut -d" " -f4)" == "$(date +%F)" ]; then
printf "\n..Seems you have already updated the msf3 source today!\n\n"
read -p "Do it again (y/n)?" -e check
if [ $check == "n" ]; then
echo ""
exit 0
fi
fi
svn update
# compile & update lorcon2
printf "\n..check for lorcon2..."
if [ ! -d "/opt/metasploit3/msf3/external/ruby-lorcon2/lorcon" ]; then
svn co https://802.11ninja.net/svn/lorcon/trunk/ lorcon
cd /opt/metasploit3/msf3/external/ruby-lorcon2/lorcon
./configure && make && make install
cd ../ && ruby extconf.rb
make && make install
elif [ -n "$(find /opt/metasploit3/msf3/external/ruby-lorcon2/lorcon/Makefile -mtime +61)" ]; then
printf "\n...lorcon2 source older than 8 weeks, will update..."
cd /opt/metasploit3/msf3/external/ruby-lorcon2/lorcon
svn update
make clean && ./configure
make && make install
cd ..
make clean && ruby extconf.rb
make && make install
else
printf "\n..looks okay...\n"
fi
printf "\n..check for ratproxy..."
cd /opt/metasploit3/msf3/external/ratproxy
if [ ! -d "ratproxy" ]; then
printf "\nupppss, no ratproxy, will download, patch & install.."
wget http://ratproxy.googlecode.com/files/ratproxy-1.58.tar.gz
tar xvf ratproxy-1.58.tar.gz
cd /opt/metasploit3/msf3/external/ratproxy
patch -b -d ratproxy < ratproxy_wmap.diff
cd /opt/metasploit3/msf3/external/ratproxy/ratproxy
make clean && make
elif [ ! -f "/opt/metasploit3/msf3/external/ratproxy/ratproxy/ratproxy.c.orig" ]; then
cd /opt/metasploit3/msf3/external/ratproxy
patch -b -d ratproxy < ratproxy_wmap.diff
cd /opt/metasploit3/msf3/external/ratproxy/ratproxy
make clean && make
else
printf "\n..looks okay...\n"
fi
printf "\n..compile & install pcaprub..."
if [ ! -f "/opt/metasploit3/msf3/external/pcaprub/pcaprub.so" ]; then
cd /opt/metasploit3/msf3/external/pcaprub
ruby extconf.rb && make && make install
else
printf "\n..looks okay...\n"
fi
printf "\n..compile & install serialport..."
if [ ! -f "/opt/metasploit3/msf3/external/serialport/serialport.so" ]; then
cd /opt/metasploit3/msf3/external/serialport
ruby extconf.rb && make && make install
else
printf "\n..looks okay...\n"
fi
printf "\n..see if we do have some basic msf3 scripts in /opt/metasploit3/msf3/_STUFF...\n"
printf "\n..looks okay...\n"
fi
printf "\n..see if we do have some basic msf3 scripts in /opt/metasploit3/msf3/_STUFF...\n"
if [ ! -d "/opt/metasploit3/msf3/_STUFF/" ]; then
mkdir /opt/metasploit3/msf3/_STUFF
elif [ ! -f "/opt/metasploit3/msf3/_STUFF/karma.rc" ]; then
cd /opt/metasploit3/msf3/_STUFF
wget http://metasploit.com/users/hdm/tools/karma.rc
elif [ ! -f "/opt/metasploit3/msf3/_STUFF/makeapplet.sh" ]; then
cd /opt/metasploit3/msf3/_STUFF
wget http://spl0it.org/files/makeapplet.sh
else
printf "\n..looks okay...\n"
fi
printf "\n..check if we do have interesting darkoperator meterpreter scripts..\n"
if [ ! -f "/opt/metasploit3/msf3/scripts/meterpreter/browserenum-dev.rb" ]; then
cd /opt/metasploit3/msf3/scripts/meterpreter
wget http://www.darkoperator.com/meterpreter/browserenum-dev.rb
elif [ ! -f "/opt/metasploit3/msf3/scripts/meterpreter/disable_audit.rb" ]; then
cd /opt/metasploit3/msf3/scripts/meterpreter
wget http://www.darkoperator.com/meterpreter/disable_audit.rb
elif [ ! -f "/opt/metasploit3/msf3/scripts/meterpreter/getcountermeasure.rb" ]; then
cd /opt/metasploit3/msf3/scripts/meterpreter
wget http://www.darkoperator.com/meterpreter/getcountermeasure.rb
else
printf "\n..looks okay...\n"
fi
cd /opt/metasploit3/msf3
echo ""
echo "######## ! DONE ! ########"
echo ""
exit 0