zerochaos    14/10/03 03:39:09

  Added:                msfloader-0.14
  Log:
  update loader based on upstream metasploit changes
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 
DD11F94A)

Revision  Changes    Path
1.1                  app-admin/eselect-metasploit/files/msfloader-0.14

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/eselect-metasploit/files/msfloader-0.14?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/eselect-metasploit/files/msfloader-0.14?rev=1.1&content-type=text/plain

Index: msfloader-0.14
===================================================================
#!/bin/sh

#todo:
#add in optional auto starting/stopping of postgres

#normally msf makes this dir, however, this script runs first
if [ ! -d ~/.msf4 ]; then
        mkdir ~/.msf4
fi

#we cannot control if msf* exits normally so always start with cleanup
if [ -f ~/.msf4/Gemfile ]; then
        rm ~/.msf4/Gemfile
fi
if ls -A ~/.msf4/*.gemspec > /dev/zero 2>&1; then
        rm ~/.msf4/*.gemspec
fi

#fetch the latest Gemfile and gemspecsfrom the selected version of msf
cp /usr/lib/metasploit/Gemfile ~/.msf4/
cp /usr/lib/metasploit/*.gemspec ~/.msf4/

#ensure Gemfile.lock is up to date
BUNDLE_GEMFILE=~/.msf4/Gemfile MSF_ROOT=/usr/lib/metasploit bundle check > 
/dev/null 2>&1
if [ "$?" != "0" ]; then
        if [ -f ~/.msf4/Gemfile.lock ]; then
                rm ~/.msf4/Gemfile.lock
        else
                echo "Something went wrong, please open a bug for metasploit on 
https://bugs.gentoo.org";
        fi
fi

#ready to go
BUNDLE_GEMFILE=~/.msf4/Gemfile MSF_ROOT=/usr/lib/metasploit bundle exec 
/usr/lib/metasploit/$(basename $0) "$@"
#profit




Reply via email to