diff options
author | Rick Farina <zerochaos@gentoo.org> | 2014-10-03 03:39:09 +0000 |
---|---|---|
committer | Rick Farina <zerochaos@gentoo.org> | 2014-10-03 03:39:09 +0000 |
commit | 08dee9f452a73bd57972489cf89d65d84f16c395 (patch) | |
tree | 2cf3fa7378a8b85a94bec042e6509e5c8026652b /app-admin/eselect-metasploit | |
parent | Version bump. (diff) | |
download | gentoo-2-08dee9f452a73bd57972489cf89d65d84f16c395.tar.gz gentoo-2-08dee9f452a73bd57972489cf89d65d84f16c395.tar.bz2 gentoo-2-08dee9f452a73bd57972489cf89d65d84f16c395.zip |
update loader based on upstream metasploit changes
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key DD11F94A)
Diffstat (limited to 'app-admin/eselect-metasploit')
-rw-r--r-- | app-admin/eselect-metasploit/ChangeLog | 8 | ||||
-rw-r--r-- | app-admin/eselect-metasploit/eselect-metasploit-0.14.ebuild | 41 | ||||
-rw-r--r-- | app-admin/eselect-metasploit/files/msfloader-0.14 | 35 |
3 files changed, 83 insertions, 1 deletions
diff --git a/app-admin/eselect-metasploit/ChangeLog b/app-admin/eselect-metasploit/ChangeLog index b6cc5e778c6c..b6aeb3c1cc21 100644 --- a/app-admin/eselect-metasploit/ChangeLog +++ b/app-admin/eselect-metasploit/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-admin/eselect-metasploit # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-metasploit/ChangeLog,v 1.5 2014/06/28 00:50:31 zerochaos Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-metasploit/ChangeLog,v 1.6 2014/10/03 03:39:09 zerochaos Exp $ + +*eselect-metasploit-0.14 (03 Oct 2014) + + 03 Oct 2014; Rick Farina <zerochaos@gentoo.org> + +eselect-metasploit-0.14.ebuild, +files/msfloader-0.14: + update loader based on upstream metasploit changes 28 Jun 2014; Rick Farina <zerochaos@gentoo.org> -eselect-metasploit-0.11.ebuild, -eselect-metasploit-0.12.ebuild, diff --git a/app-admin/eselect-metasploit/eselect-metasploit-0.14.ebuild b/app-admin/eselect-metasploit/eselect-metasploit-0.14.ebuild new file mode 100644 index 000000000000..8df96126cb3a --- /dev/null +++ b/app-admin/eselect-metasploit/eselect-metasploit-0.14.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-metasploit/eselect-metasploit-0.14.ebuild,v 1.1 2014/10/03 03:39:09 zerochaos Exp $ + +EAPI=5 + +inherit multilib + +DESCRIPTION="eselect module for metasploit" +HOMEPAGE="http://www.pentoo.ch/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="" + +DEPEND="app-admin/eselect + !<net-analyzer/metasploit-4.6" +RDEPEND="${DEPEND}" + +S=${WORKDIR} + +src_install() { + #force to use the outdated bundled version of metasm + doenvd "${FILESDIR}"/91metasploit + + newinitd "${FILESDIR}"/msfrpcd.initd msfrpcd + newconfd "${FILESDIR}"/msfrpcd.confd msfrpcd + + insinto /usr/share/eselect/modules + newins "${FILESDIR}/metasploit.eselect-0.13" metasploit.eselect + + newbin "${FILESDIR}"/msfloader-${PV} msfloader +} + +pkg_postinst() { + "${EROOT}"/usr/bin/eselect metasploit set --use-old 1 + elog "To switch between installed slots, execute as root:" + elog " # eselect metasploit set [slot number]" +} diff --git a/app-admin/eselect-metasploit/files/msfloader-0.14 b/app-admin/eselect-metasploit/files/msfloader-0.14 new file mode 100644 index 000000000000..ab5f5d302294 --- /dev/null +++ b/app-admin/eselect-metasploit/files/msfloader-0.14 @@ -0,0 +1,35 @@ +#!/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 |