Gentoo Archives: gentoo-commits

From: "Richard Farina (zerochaos)" <zerochaos@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-admin/eselect-metasploit/files: msfloader-0.14
Date: Fri, 03 Oct 2014 03:39:15
Message-Id: 20141003033909.9EE976D12@oystercatcher.gentoo.org
1 zerochaos 14/10/03 03:39:09
2
3 Added: msfloader-0.14
4 Log:
5 update loader based on upstream metasploit changes
6
7 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key DD11F94A)
8
9 Revision Changes Path
10 1.1 app-admin/eselect-metasploit/files/msfloader-0.14
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/eselect-metasploit/files/msfloader-0.14?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/eselect-metasploit/files/msfloader-0.14?rev=1.1&content-type=text/plain
14
15 Index: msfloader-0.14
16 ===================================================================
17 #!/bin/sh
18
19 #todo:
20 #add in optional auto starting/stopping of postgres
21
22 #normally msf makes this dir, however, this script runs first
23 if [ ! -d ~/.msf4 ]; then
24 mkdir ~/.msf4
25 fi
26
27 #we cannot control if msf* exits normally so always start with cleanup
28 if [ -f ~/.msf4/Gemfile ]; then
29 rm ~/.msf4/Gemfile
30 fi
31 if ls -A ~/.msf4/*.gemspec > /dev/zero 2>&1; then
32 rm ~/.msf4/*.gemspec
33 fi
34
35 #fetch the latest Gemfile and gemspecsfrom the selected version of msf
36 cp /usr/lib/metasploit/Gemfile ~/.msf4/
37 cp /usr/lib/metasploit/*.gemspec ~/.msf4/
38
39 #ensure Gemfile.lock is up to date
40 BUNDLE_GEMFILE=~/.msf4/Gemfile MSF_ROOT=/usr/lib/metasploit bundle check > /dev/null 2>&1
41 if [ "$?" != "0" ]; then
42 if [ -f ~/.msf4/Gemfile.lock ]; then
43 rm ~/.msf4/Gemfile.lock
44 else
45 echo "Something went wrong, please open a bug for metasploit on https://bugs.gentoo.org"
46 fi
47 fi
48
49 #ready to go
50 BUNDLE_GEMFILE=~/.msf4/Gemfile MSF_ROOT=/usr/lib/metasploit bundle exec /usr/lib/metasploit/$(basename $0) "$@"
51 #profit