diff options
author | Cédric Krier <cedk@gentoo.org> | 2007-09-09 11:56:21 +0000 |
---|---|---|
committer | Cédric Krier <cedk@gentoo.org> | 2007-09-09 11:56:21 +0000 |
commit | 54be9fffee1d3234a338f02523f5311fdd6e6145 (patch) | |
tree | 143cadea48da62d9ee4fd99aff31a226557d371f /net-analyzer | |
parent | Add httpd use flag for net-analyzer/metasploit (diff) | |
download | gentoo-2-54be9fffee1d3234a338f02523f5311fdd6e6145.tar.gz gentoo-2-54be9fffee1d3234a338f02523f5311fdd6e6145.tar.bz2 gentoo-2-54be9fffee1d3234a338f02523f5311fdd6e6145.zip |
Version bump with new slot for bug #142778
(Portage version: 2.1.2.12)
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/metasploit/ChangeLog | 8 | ||||
-rw-r--r-- | net-analyzer/metasploit/files/digest-metasploit-3.0 | 3 | ||||
-rw-r--r-- | net-analyzer/metasploit/files/metasploit-3.0.patch | 107 | ||||
-rw-r--r-- | net-analyzer/metasploit/files/msfweb3.confd | 10 | ||||
-rw-r--r-- | net-analyzer/metasploit/files/msfweb3.initd | 19 | ||||
-rw-r--r-- | net-analyzer/metasploit/metasploit-3.0.ebuild | 66 |
6 files changed, 212 insertions, 1 deletions
diff --git a/net-analyzer/metasploit/ChangeLog b/net-analyzer/metasploit/ChangeLog index acd5ab8952d8..68f5eeacc33b 100644 --- a/net-analyzer/metasploit/ChangeLog +++ b/net-analyzer/metasploit/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-analyzer/metasploit # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/ChangeLog,v 1.22 2007/02/07 20:44:41 blubb Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/ChangeLog,v 1.23 2007/09/09 11:56:20 cedk Exp $ + +*metasploit-3.0 (09 Sep 2007) + + 09 Sep 2007; Cédric Krier <cedk@gentoo.org> +files/msfweb3.confd, + +files/metasploit-3.0.patch, +files/msfweb3.initd, +metasploit-3.0.ebuild: + Version bump with new slot for bug #142778 07 Feb 2007; Simon Stelling <blubb@gentoo.org> metasploit-2.7.ebuild: stable on amd64; bug 164246 diff --git a/net-analyzer/metasploit/files/digest-metasploit-3.0 b/net-analyzer/metasploit/files/digest-metasploit-3.0 new file mode 100644 index 000000000000..2a55a2bd25a4 --- /dev/null +++ b/net-analyzer/metasploit/files/digest-metasploit-3.0 @@ -0,0 +1,3 @@ +MD5 ab98f0a09b371f9638c7f49f1b83f5c4 framework-3.0.tar.gz 5519218 +RMD160 849305ffcf0ccbdf16d3dac8d7ab20ac745fbcd8 framework-3.0.tar.gz 5519218 +SHA256 cb27df6dafe7b2d1c2d2174000afd07965cdc09e759e8cda5147cfc58e445251 framework-3.0.tar.gz 5519218 diff --git a/net-analyzer/metasploit/files/metasploit-3.0.patch b/net-analyzer/metasploit/files/metasploit-3.0.patch new file mode 100644 index 000000000000..916c46d5a50d --- /dev/null +++ b/net-analyzer/metasploit/files/metasploit-3.0.patch @@ -0,0 +1,107 @@ +diff -u orig/msfcli ./msfcli +--- orig/msfcli 2007-03-29 14:06:12.000000000 +0530 ++++ ./msfcli 2007-03-29 14:08:23.000000000 +0530 +@@ -5,7 +5,7 @@ + # or web-based interface. + # + +-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__ ++msfbase = File.symlink?(__FILE__) ? File.expand_path(File.readlink(__FILE__), File.dirname(__FILE__)) : __FILE__ + $:.unshift(File.join(File.dirname(msfbase), 'lib')) + + require 'rex' +diff -u orig/msfconsole ./msfconsole +--- orig/msfconsole 2007-03-29 14:06:07.000000000 +0530 ++++ ./msfconsole 2007-03-29 14:08:42.000000000 +0530 +@@ -4,7 +4,7 @@ + # framework. + # + +-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__ ++msfbase = File.symlink?(__FILE__) ? File.expand_path(File.readlink(__FILE__), File.dirname(__FILE__)) : __FILE__ + $:.unshift(File.join(File.dirname(msfbase), 'lib')) + + require 'rex' +diff -u orig/msfd ./msfd +--- orig/msfd 2007-03-29 14:06:01.000000000 +0530 ++++ ./msfd 2007-03-29 14:08:55.000000000 +0530 +@@ -6,8 +6,8 @@ + # possible for sessions to to be shared from a single vantage point. + # + +-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__ +-$:.unshift(File.join(File.dirname(msfbase), 'lib')) ++msfbase = File.symlink?(__FILE__) ? File.expand_path(File.readlink(__FILE__), File.dirname(__FILE__)) : __FILE__ ++$:.unshift(File.join(File.dirname(msfbase), 'lib')) + + require 'msf/base' + require 'msf/ui' +diff -u orig/msfencode ./msfencode +--- orig/msfencode 2007-03-29 14:05:56.000000000 +0530 ++++ ./msfencode 2007-03-29 14:09:16.000000000 +0530 +@@ -1,6 +1,6 @@ + #!/usr/bin/env ruby + +-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__ ++msfbase = File.symlink?(__FILE__) ? File.expand_path(File.readlink(__FILE__), File.dirname(__FILE__)) : __FILE__ + $:.unshift(File.join(File.dirname(msfbase), 'lib')) + + require 'rex' +diff -u orig/msfgui ./msfgui +--- orig/msfgui 2007-03-29 14:05:51.000000000 +0530 ++++ ./msfgui 2007-03-29 14:09:28.000000000 +0530 +@@ -3,7 +3,7 @@ + # This is a basic user interface using the Gtk2 GUI library + # + +-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__ ++msfbase = File.symlink?(__FILE__) ? File.expand_path(File.readlink(__FILE__), File.dirname(__FILE__)) : __FILE__ + $:.unshift(File.join(File.dirname(msfbase), 'lib')) + + +diff -u orig/msfopcode ./msfopcode +--- orig/msfopcode 2007-03-29 14:05:43.000000000 +0530 ++++ ./msfopcode 2007-03-29 14:09:39.000000000 +0530 +@@ -5,7 +5,7 @@ + # and to display information about modules. + # + +-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__ ++msfbase = File.symlink?(__FILE__) ? File.expand_path(File.readlink(__FILE__), File.dirname(__FILE__)) : __FILE__ + $:.unshift(File.join(File.dirname(msfbase), 'lib')) + + require 'rex' +diff -u orig/msfpayload ./msfpayload +--- orig/msfpayload 2007-03-29 14:05:37.000000000 +0530 ++++ ./msfpayload 2007-03-29 14:09:53.000000000 +0530 +@@ -1,6 +1,6 @@ + #!/usr/bin/env ruby + +-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__ ++msfbase = File.symlink?(__FILE__) ? File.expand_path(File.readlink(__FILE__), File.dirname(__FILE__)) : __FILE__ + $:.unshift(File.join(File.dirname(msfbase), 'lib')) + + require 'rex' +diff -u orig/msfpescan ./msfpescan +--- orig/msfpescan 2007-03-29 14:05:26.000000000 +0530 ++++ ./msfpescan 2007-03-29 14:10:02.000000000 +0530 +@@ -1,6 +1,6 @@ + #!/usr/bin/env ruby + +-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__ ++msfbase = File.symlink?(__FILE__) ? File.expand_path(File.readlink(__FILE__), File.dirname(__FILE__)) : __FILE__ + $:.unshift(File.join(File.dirname(msfbase), 'lib')) + + require 'rex/peparsey' +diff -u orig/msfweb ./msfweb +--- orig/msfweb 2007-03-29 14:05:20.000000000 +0530 ++++ ./msfweb 2007-03-29 14:10:13.000000000 +0530 +@@ -3,7 +3,7 @@ + # This user interface provides users with a web-based interface to the framework + # + +-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__ ++msfbase = File.symlink?(__FILE__) ? File.expand_path(File.readlink(__FILE__), File.dirname(__FILE__)) : __FILE__ + $:.unshift(File.join(File.dirname(msfbase), 'lib')) + + diff --git a/net-analyzer/metasploit/files/msfweb3.confd b/net-analyzer/metasploit/files/msfweb3.confd new file mode 100644 index 000000000000..b0cf87e6dfaf --- /dev/null +++ b/net-analyzer/metasploit/files/msfweb3.confd @@ -0,0 +1,10 @@ +# Config file for /etc/init.d/metasploit + +# Bind to the following IP instead of the loopback address +IPADDR=127.0.0.1 + +# Bind to the following TCP port instead of default 55555 +PORT=55555 + +# All options +MSF_OPTS="-a $IPADDR -p $PORT" diff --git a/net-analyzer/metasploit/files/msfweb3.initd b/net-analyzer/metasploit/files/msfweb3.initd new file mode 100644 index 000000000000..67cba7696014 --- /dev/null +++ b/net-analyzer/metasploit/files/msfweb3.initd @@ -0,0 +1,19 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/files/msfweb3.initd,v 1.1 2007/09/09 11:56:21 cedk Exp $ + +PIDFILE=/var/run/msfweb3.pid + +start() { + ebegin "Starting msfweb3" + start-stop-daemon --start --quiet --background --startas /usr/bin/msfweb3 --exec /usr/bin/ruby \ + --pidfile ${PIDFILE} --make-pidfile -- ${MSF_OPTS} + eend $? +} + +stop() { + ebegin "Stopping msfweb" + start-stop-daemon --stop --quiet -s 9 --pidfile ${PIDFILE} + eend $? +} diff --git a/net-analyzer/metasploit/metasploit-3.0.ebuild b/net-analyzer/metasploit/metasploit-3.0.ebuild new file mode 100644 index 000000000000..2b9a8fc627a6 --- /dev/null +++ b/net-analyzer/metasploit/metasploit-3.0.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/metasploit-3.0.ebuild,v 1.1 2007/09/09 11:56:20 cedk Exp $ + +inherit eutils + +MY_P="${PN/metasploit/framework}-${PV}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="The Metasploit Framework is an advanced open-source platform for developing, testing, and using vulnerability exploit code." +HOMEPAGE="http://www.metasploit.org/" +SRC_URI="${MY_P}.tar.gz" + +LICENSE="MSF-1.2" +SLOT="3" +KEYWORDS="~amd64 ~ppc ~x86" +RESTRICT="fetch" +IUSE="gtk sqlite sqlite3 postgres httpd" + +RDEPEND="dev-lang/ruby + gtk? ( dev-ruby/ruby-libglade2 ) + httpd? ( =dev-ruby/rails-1.2.2* ) + sqlite? ( dev-ruby/sqlite-ruby + dev-ruby/activerecord ) + sqlite3? ( dev-ruby/sqlite3-ruby + dev-ruby/activerecord ) + postgres? ( dev-ruby/ruby-postgres + dev-ruby/activerecord )" +DEPEND="" + +pkg_nofetch() { + # Fetch restricted due to license acceptation + einfo "Please download the framework from:" + einfo "http://metasploit.com/projects/Framework/msf3/download.html?Release=${MY_P}.tar.gz" + einfo "and move it to ${DISTDIR}" +} + +src_compile() { + epatch "${FILESDIR}"/${P}.patch +} + +src_install() { + dodir /usr/lib/ + dodir /usr/bin/ + + # remove the subversion directories + find ${S} -type d -name ".svn" | xargs rm -R + + # should be as simple as copying everything into the target... + dodir /usr/lib/metasploit${SLOT} + cp -R "${S}"/* "${D}"/usr/lib/metasploit${SLOT} || die "Copy files failed" + rm -Rf "${D}"/usr/lib/metasploit${SLOT}/documentation "${D}"/README + + for file in `ls msf*`; do + dosym /usr/lib/metasploit${SLOT}/${file} /usr/bin/${file}${SLOT} + done + + chown -R root:root ${D} + + if use httpd; then + newinitd "${FILESDIR}"/msfweb${SLOT}.initd msfweb${SLOT} \ + || die "newinitd failed" + newconfd "${FILESDIR}"/msfweb${SLOT}.confd msfweb${SLOT} \ + || die "newconfd failed" + fi +} |