From 02bd428e62ca2cba9e41b923386b564283caa763 Mon Sep 17 00:00:00 2001 From: Zero_Chaos Date: Fri, 4 Sep 2015 17:02:30 -0400 Subject: [PATCH] net-analyzer/metasploit: add a modern version of metasploit (and a ton of deps for it) --- dev-ruby/arel-helpers/Manifest | 1 + .../arel-helpers/arel-helpers-2.0.1.ebuild | 21 ++ dev-ruby/arel-helpers/metadata.xml | 13 + dev-ruby/metasploit-concern/Manifest | 1 + dev-ruby/metasploit-concern/metadata.xml | 13 + .../metasploit-concern-1.0.0.ebuild | 50 ++++ dev-ruby/metasploit-credential/Manifest | 1 + dev-ruby/metasploit-credential/metadata.xml | 13 + .../metasploit-credential-1.0.0.ebuild | 52 ++++ dev-ruby/metasploit-model/Manifest | 1 + dev-ruby/metasploit-model/metadata.xml | 14 + .../metasploit-model-1.0.0.ebuild | 73 +++++ dev-ruby/metasploit-payloads/Manifest | 1 + dev-ruby/metasploit-payloads/metadata.xml | 13 + .../metasploit-payloads-1.0.9.ebuild | 45 +++ dev-ruby/metasploit_data_models/Manifest | 2 +- .../metasploit_data_models-0.17.0.ebuild | 29 -- .../metasploit_data_models-1.2.5.ebuild | 63 ++++ dev-ruby/meterpreter_bins/Manifest | 3 +- ....ebuild => meterpreter_bins-0.0.22.ebuild} | 8 +- .../meterpreter_bins-0.0.6.ebuild | 26 -- dev-ruby/pg_array_parser/Manifest | 1 + dev-ruby/pg_array_parser/metadata.xml | 13 + .../pg_array_parser-0.0.9.ebuild | 42 +++ dev-ruby/postgres_ext/Manifest | 1 + dev-ruby/postgres_ext/metadata.xml | 13 + .../postgres_ext/postgres_ext-2.4.1.ebuild | 50 ++++ dev-ruby/rb-readline-r7/Manifest | 1 + dev-ruby/rb-readline-r7/metadata.xml | 13 + .../rb-readline-r7-0.5.2.0.ebuild | 24 ++ dev-ruby/recog/Manifest | 1 + dev-ruby/recog/metadata.xml | 13 + dev-ruby/recog/recog-2.0.6.ebuild | 19 ++ dev-ruby/rubyntlm/Manifest | 1 + dev-ruby/rubyntlm/metadata.xml | 13 + dev-ruby/rubyntlm/rubyntlm-0.4.0.ebuild | 17 ++ net-analyzer/metasploit/Manifest | 2 +- net-analyzer/metasploit/metadata.xml | 1 - ...d => metasploit-4.11.4_p2015090201.ebuild} | 89 +++--- .../metasploit/metasploit-4.9.3.ebuild | 273 ------------------ 40 files changed, 661 insertions(+), 369 deletions(-) create mode 100644 dev-ruby/arel-helpers/Manifest create mode 100644 dev-ruby/arel-helpers/arel-helpers-2.0.1.ebuild create mode 100644 dev-ruby/arel-helpers/metadata.xml create mode 100644 dev-ruby/metasploit-concern/Manifest create mode 100644 dev-ruby/metasploit-concern/metadata.xml create mode 100644 dev-ruby/metasploit-concern/metasploit-concern-1.0.0.ebuild create mode 100644 dev-ruby/metasploit-credential/Manifest create mode 100644 dev-ruby/metasploit-credential/metadata.xml create mode 100644 dev-ruby/metasploit-credential/metasploit-credential-1.0.0.ebuild create mode 100644 dev-ruby/metasploit-model/Manifest create mode 100644 dev-ruby/metasploit-model/metadata.xml create mode 100644 dev-ruby/metasploit-model/metasploit-model-1.0.0.ebuild create mode 100644 dev-ruby/metasploit-payloads/Manifest create mode 100644 dev-ruby/metasploit-payloads/metadata.xml create mode 100644 dev-ruby/metasploit-payloads/metasploit-payloads-1.0.9.ebuild delete mode 100644 dev-ruby/metasploit_data_models/metasploit_data_models-0.17.0.ebuild create mode 100644 dev-ruby/metasploit_data_models/metasploit_data_models-1.2.5.ebuild rename dev-ruby/meterpreter_bins/{meterpreter_bins-0.0.10.ebuild => meterpreter_bins-0.0.22.ebuild} (66%) delete mode 100644 dev-ruby/meterpreter_bins/meterpreter_bins-0.0.6.ebuild create mode 100644 dev-ruby/pg_array_parser/Manifest create mode 100644 dev-ruby/pg_array_parser/metadata.xml create mode 100644 dev-ruby/pg_array_parser/pg_array_parser-0.0.9.ebuild create mode 100644 dev-ruby/postgres_ext/Manifest create mode 100644 dev-ruby/postgres_ext/metadata.xml create mode 100644 dev-ruby/postgres_ext/postgres_ext-2.4.1.ebuild create mode 100644 dev-ruby/rb-readline-r7/Manifest create mode 100644 dev-ruby/rb-readline-r7/metadata.xml create mode 100644 dev-ruby/rb-readline-r7/rb-readline-r7-0.5.2.0.ebuild create mode 100644 dev-ruby/recog/Manifest create mode 100644 dev-ruby/recog/metadata.xml create mode 100644 dev-ruby/recog/recog-2.0.6.ebuild create mode 100644 dev-ruby/rubyntlm/Manifest create mode 100644 dev-ruby/rubyntlm/metadata.xml create mode 100644 dev-ruby/rubyntlm/rubyntlm-0.4.0.ebuild rename net-analyzer/metasploit/{metasploit-9999.ebuild => metasploit-4.11.4_p2015090201.ebuild} (78%) delete mode 100644 net-analyzer/metasploit/metasploit-4.9.3.ebuild diff --git a/dev-ruby/arel-helpers/Manifest b/dev-ruby/arel-helpers/Manifest new file mode 100644 index 000000000000..fc265309fad6 --- /dev/null +++ b/dev-ruby/arel-helpers/Manifest @@ -0,0 +1 @@ +DIST arel-helpers-2.0.1.gem 9728 SHA256 de627d6d78af542d99bdfd178e7decd8f351e4de66758ac220f92418291b8b82 SHA512 241af61b00822ac091a04673ae0f6421c88ce8b96141cc9f468c62465b2720ca38d1a041faa720db40dd3a4cee407c1126152ac6125b3ed9a759daedd06b6955 WHIRLPOOL 3024a34b8a9720acbfb66e811b97ff1954c3cda83a97bc2544b5dbab0d94f5eb09eec8891c88bd0582dfdffdfe5abbf1e3be47cc9b61b888e52cb8a85121ab3c diff --git a/dev-ruby/arel-helpers/arel-helpers-2.0.1.ebuild b/dev-ruby/arel-helpers/arel-helpers-2.0.1.ebuild new file mode 100644 index 000000000000..cb27f95787c9 --- /dev/null +++ b/dev-ruby/arel-helpers/arel-helpers-2.0.1.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/metasploit_data_models/metasploit_data_models-0.17.0.ebuild,v 1.3 2014/07/09 21:13:54 zerochaos Exp $ + +EAPI=5 +USE_RUBY="ruby19 ruby20 ruby21" + +inherit ruby-fakegem + +DESCRIPTION="Tools to help construct database queries" +HOMEPAGE="https://github.com/camertron/arel-helpers" +SRC_URI="mirror://rubygems/${P}.gem" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +ruby_add_rdepend "|| ( dev-ruby/activerecord:3.2 + dev-ruby/activerecord:4.1 + dev-ruby/activerecord:4.2 )" diff --git a/dev-ruby/arel-helpers/metadata.xml b/dev-ruby/arel-helpers/metadata.xml new file mode 100644 index 000000000000..0754654cf4e5 --- /dev/null +++ b/dev-ruby/arel-helpers/metadata.xml @@ -0,0 +1,13 @@ + + + + + zerochaos@gentoo.org + Rick Farina + + + + + camertron/arel-helpers + + diff --git a/dev-ruby/metasploit-concern/Manifest b/dev-ruby/metasploit-concern/Manifest new file mode 100644 index 000000000000..5108dd2dc476 --- /dev/null +++ b/dev-ruby/metasploit-concern/Manifest @@ -0,0 +1 @@ +DIST metasploit-concern-1.0.0.gem 13312 SHA256 0479a6766d4754720d8eb6ac6b9c108c68095b7e3068d4cca62dd5838173ecfe SHA512 2fc2e511503b4efcc10fec9e0027936333a16de14acd53155942bde1d77e5e208510ec2b563e9ffb81d49d320b6f62bf0fd04f40bc2d2703778943d4730d5bc9 WHIRLPOOL 748be7d2f09af22d9767a0b41321182637058ceefbff8dd1a41ba336a5c31c9c59589b80a012402e7fd33e6892f6ca233d7b0d3cc4d863a955a3fc617f3eaeb2 diff --git a/dev-ruby/metasploit-concern/metadata.xml b/dev-ruby/metasploit-concern/metadata.xml new file mode 100644 index 000000000000..49861c0ca246 --- /dev/null +++ b/dev-ruby/metasploit-concern/metadata.xml @@ -0,0 +1,13 @@ + + + + + zerochaos@gentoo.org + Rick Farina + + + + + rapid7/metasploit-concern + + diff --git a/dev-ruby/metasploit-concern/metasploit-concern-1.0.0.ebuild b/dev-ruby/metasploit-concern/metasploit-concern-1.0.0.ebuild new file mode 100644 index 000000000000..7891f8db6920 --- /dev/null +++ b/dev-ruby/metasploit-concern/metasploit-concern-1.0.0.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/metasploit_data_models/metasploit_data_models-0.17.0.ebuild,v 1.3 2014/07/09 21:13:54 zerochaos Exp $ + +EAPI=5 +USE_RUBY="ruby19 ruby20 ruby21" + +RUBY_FAKEGEM_EXTRAINSTALL="app spec" + +inherit ruby-fakegem versionator + +DESCRIPTION="Metasploit concern allows you to define concerns in app/concerns. " +HOMEPAGE="https://github.com/rapid7/metasploit-concern" +SRC_URI="mirror://rubygems/${P}.gem" + +LICENSE="BSD" +SLOT="$(get_version_component_range 1-2)" +KEYWORDS="~amd64 ~x86" +#IUSE="development test" +RESTRICT=test +IUSE="" + +RDEPEND="${RDEPEND} !dev-ruby/metasploit-concern:0" + +ruby_add_rdepend ">=dev-ruby/railties-4.0.9:4.0 + >=dev-ruby/activesupport-4.0.9:4.0" +ruby_add_bdepend "dev-ruby/bundler" + +all_ruby_prepare() { + [ -f Gemfile.lock ] && rm Gemfile.lock + #For now, we don't support development or testing at all + #if ! use development; then + sed -i -e "/^group :development do/,/^end$/d" Gemfile || die + sed -i -e "/s.add_development_dependency/d" "${PN}".gemspec || die + #fi + #if ! use test; then + sed -i -e "/^group :test do/,/^end$/d" Gemfile || die + #fi + #if ! use test && ! use development; then + sed -i -e "/^group :development, :test do/,/^end$/d" Gemfile || die + #fi +} + +each_ruby_prepare() { + if [ -f Gemfile ] + then + BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle install --local || die + BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle check || die + fi +} diff --git a/dev-ruby/metasploit-credential/Manifest b/dev-ruby/metasploit-credential/Manifest new file mode 100644 index 000000000000..948e652c654d --- /dev/null +++ b/dev-ruby/metasploit-credential/Manifest @@ -0,0 +1 @@ +DIST metasploit-credential-1.0.0.gem 101888 SHA256 086cb65295f1294c213138bd2a9f2f727d945b90837a7e877b22bc6a47fe33f6 SHA512 4af09458a83d9425c5bfd744bc3f366c08d9175b4c303fa9ff53dd3f2163ba654748ea883d22f069e3b3be1218b57afe909f7ba31feb54c0b7ff781af8d5e631 WHIRLPOOL 506c707f3e1be0e90fad02397a34c70e44d1f423b5909d9f61152e2a4e929eadccf0736ec607c569fe75fff24c6003243d0a9a288979450b8c52d5f1feba1f6d diff --git a/dev-ruby/metasploit-credential/metadata.xml b/dev-ruby/metasploit-credential/metadata.xml new file mode 100644 index 000000000000..7b6d0792a58d --- /dev/null +++ b/dev-ruby/metasploit-credential/metadata.xml @@ -0,0 +1,13 @@ + + + + + zerochaos@gentoo.org + Rick Farina + + + + + rapid7/metasploit-credential + + diff --git a/dev-ruby/metasploit-credential/metasploit-credential-1.0.0.ebuild b/dev-ruby/metasploit-credential/metasploit-credential-1.0.0.ebuild new file mode 100644 index 000000000000..98db6b6be7ef --- /dev/null +++ b/dev-ruby/metasploit-credential/metasploit-credential-1.0.0.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: Exp $ + +EAPI=5 +USE_RUBY="ruby19 ruby20 ruby21" + +inherit ruby-fakegem versionator + +RUBY_FAKEGEM_EXTRAINSTALL="app config db spec" + +DESCRIPTION="Code for modeling and managing credentials in Metasploit" +HOMEPAGE="https://github.com/rapid7/metasploit-credential" +SRC_URI="mirror://rubygems/${P}.gem" + +LICENSE="BSD" +SLOT="$(get_version_component_range 1-2)" +KEYWORDS="~amd64 ~x86" +IUSE="" + +ruby_add_rdepend ">=dev-ruby/metasploit-concern-1.0.0:1.0 + >=dev-ruby/metasploit_data_models-1.2.0 + >=dev-ruby/metasploit-model-1.0.0 + dev-ruby/rubyzip:1 + dev-ruby/rubyntlm + >=dev-ruby/railties-4.0.9:4.0 + dev-ruby/net-ssh + dev-ruby/pg" +ruby_add_bdepend "dev-ruby/bundler" + +all_ruby_prepare() { + [ -f Gemfile.lock ] && rm Gemfile.lock + #For now, we don't support development or testing at all + #if ! use development; then + sed -i -e "/^group :development do/,/^end$/d" Gemfile || die + sed -i -e "/s.add_development_dependency/d" "${PN}".gemspec || die + #fi + #if ! use test; then + sed -i -e "/^group :test do/,/^end$/d" Gemfile || die + #fi + #if ! use test && ! use development; then + sed -i -e "/^group :development, :test do/,/^end$/d" Gemfile || die + #fi +} + +each_ruby_prepare() { + if [ -f Gemfile ] + then + BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle install --local || die + BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle check || die + fi +} diff --git a/dev-ruby/metasploit-model/Manifest b/dev-ruby/metasploit-model/Manifest new file mode 100644 index 000000000000..9c02535ff507 --- /dev/null +++ b/dev-ruby/metasploit-model/Manifest @@ -0,0 +1 @@ +DIST metasploit-model-1.0.0.gem 77312 SHA256 72e523dd4c13c6146a885599eae150b6addcc1b5e19165fd3382c5a783551cfe SHA512 1020b395787c6ad0f5b409c997f672e35e442e2499081dfab812a87c2aa8ff60d2b59ec1420e88b552e28c9ec12b420806475168da757e41e265d0b8df62dc39 WHIRLPOOL 5f211e16e3c383be0db5a66e97c95d7ff67831e1cfe980b325ff01d353094c69c47f245437ad354e4bd2b6293de288e751d39ead8e37f32242dde71a7b2c487e diff --git a/dev-ruby/metasploit-model/metadata.xml b/dev-ruby/metasploit-model/metadata.xml new file mode 100644 index 000000000000..a7eb21203ceb --- /dev/null +++ b/dev-ruby/metasploit-model/metadata.xml @@ -0,0 +1,14 @@ + + + + + zerochaos@gentoo.org + Rick Farina + + +Common code, such as validators and mixins, that are shared between ActiveModels in metasploit-framework and ActiveRecords in metasploit_data_models + + + rapid7/metasploit-model + + diff --git a/dev-ruby/metasploit-model/metasploit-model-1.0.0.ebuild b/dev-ruby/metasploit-model/metasploit-model-1.0.0.ebuild new file mode 100644 index 000000000000..ef23f49ed1a1 --- /dev/null +++ b/dev-ruby/metasploit-model/metasploit-model-1.0.0.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/metasploit_data_models/metasploit_data_models-0.17.0.ebuild,v 1.3 2014/07/09 21:13:54 zerochaos Exp $ + +EAPI=5 +USE_RUBY="ruby19 ruby20 ruby21" + +inherit ruby-fakegem + +RUBY_FAKEGEM_EXTRAINSTALL="app config script spec" + +DESCRIPTION="Common code, such as validators and mixins" +HOMEPAGE="https://github.com/rapid7/metasploit-model" +SRC_URI="mirror://rubygems/${P}.gem" + +LICENSE="BSD" +SLOT="$(get_version_component_range 1-2)" +KEYWORDS="~amd64 ~x86" +#IUSE="development test" +RESTRICT=test +IUSE="" + +RDEPEND="${RDEPEND} !dev-ruby/metasploit-model:0" + +ruby_add_rdepend ">=dev-ruby/railties-4.0.9:4.0 + >=dev-ruby/activesupport-4.0.9:4.0 + >=dev-ruby/activemodel-4.0.9:4.0" +# development? ( dev-ruby/bundler +# dev-ruby/rake +# dev-ruby/i18n +# dev-ruby/multi_json +# dev-ruby/builder +# dev-ruby/erubis +# dev-ruby/journey +# dev-ruby/rack +# dev-ruby/rack-cache +# dev-ruby/rack-test +# dev-ruby/hike +# dev-ruby/tilt +# dev-ruby/sprockets:* +# dev-ruby/actionpack:4.0 +# dev-ruby/json +# dev-ruby/rack-ssl:* +# dev-ruby/rdoc +# dev-ruby/thor +# dev-ruby/redcarpet +# + + + + zerochaos@gentoo.org + Rick Farina + + + + + rapid7/metasploit-payloads + + diff --git a/dev-ruby/metasploit-payloads/metasploit-payloads-1.0.9.ebuild b/dev-ruby/metasploit-payloads/metasploit-payloads-1.0.9.ebuild new file mode 100644 index 000000000000..5780ee6249f9 --- /dev/null +++ b/dev-ruby/metasploit-payloads/metasploit-payloads-1.0.9.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/meterpreter_bins/meterpreter_bins-0.0.10.ebuild,v 1.1 2014/10/19 23:24:24 zerochaos Exp $ + +EAPI=5 + +USE_RUBY="ruby19 ruby20 ruby21" + +RUBY_FAKEGEM_TASK_DOC="" + +RUBY_FAKEGEM_EXTRAINSTALL="data" + +inherit ruby-fakegem + +DESCRIPTION="Compiled binaries for Metasploit's Meterpreter" +HOMEPAGE="https://rubygems.org/gems/metasploit-payloads" + +LICENSE="BSD" + +SLOT="${PV}" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="" + +#no tests +RESTRICT=test + +QA_PREBUILT=" + usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/meterpreter/msflinker_linux_x86.bin + usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/meterpreter/ext_server_sniffer.lso + usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/meterpreter/ext_server_networkpug.lso + usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/meterpreter/ext_server_stdapi.lso + usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/android/libs/armeabi/libndkstager.so + usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/android/libs/mips/libndkstager.so + usr/$(get_libdir)/ruby/gems/*/gems/${PN}-${SLOT}/data/android/libs/x86/libndkstager.so + " + +src_install() { + ruby-ng_src_install + #tell revdep-rebuild to ignore binaries meant for the target + dodir /etc/revdep-rebuild + cat <<-EOF > "${ED}"/etc/revdep-rebuild/99-${PN}-${SLOT} + #These dirs contain prebuilt binaries for running on the TARGET not the HOST + SEARCH_DIRS_MASK="/usr/lib*/ruby/gems/*/gems/${PN}-${SLOT}/data/android/libs" + EOF +} diff --git a/dev-ruby/metasploit_data_models/Manifest b/dev-ruby/metasploit_data_models/Manifest index b6c9b2d9c770..fbf69cf4699f 100644 --- a/dev-ruby/metasploit_data_models/Manifest +++ b/dev-ruby/metasploit_data_models/Manifest @@ -1 +1 @@ -DIST metasploit_data_models-0.17.0.tar.gz 93759 SHA256 ce24d5ac6ff4e60dd04ed82c9e7821617c1234d32c7e6708573fc5a36942532f SHA512 0ca1556d6c8b8a83abd4bad2641d795979e5c7df8bd226ea9be6024df7bb71cec0e5434126a33e09842618a6df1e6dbec0d9049bd4997f3042b063c413e50c69 WHIRLPOOL 224e873f2457cbbd6a142fc28b0076cb325382055a3fcbd20107fc3d439e3ce2cf28e3007517fec7b6537a58194322497bc98342b6d11d4b3a051355a10b6965 +DIST metasploit_data_models-1.2.5.gem 170496 SHA256 7aa426e8f0d69c7a2c00f916dfbbbd19817ec0fe5e55e2d1260fb37ff8b32e29 SHA512 b7bb1f12da67b0a052cba68e5f870bc7512baba884573a79095abd4d55539c18956615bd7097f1c1260507222f80644a2d0a65bb9f3ca7cc4c45e275ee5c9500 WHIRLPOOL d6702bdeb59e8dcac3516f2ba8be3a319348e6a08803bcc93a8beba6a76a6e3ca5ce8e46263f9e30c37f01c745ab4badd3665a3984f7ea6ae015bb4b8c3330ec diff --git a/dev-ruby/metasploit_data_models/metasploit_data_models-0.17.0.ebuild b/dev-ruby/metasploit_data_models/metasploit_data_models-0.17.0.ebuild deleted file mode 100644 index 69ac28f2ac76..000000000000 --- a/dev-ruby/metasploit_data_models/metasploit_data_models-0.17.0.ebuild +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -USE_RUBY="ruby19 ruby20 ruby21" - -RUBY_FAKEGEM_TASK_DOC="" - -# Tests depend on unpackaged factory_girl_rails -RUBY_FAKEGEM_RECIPE_TEST="" - -RUBY_FAKEGEM_EXTRAINSTALL="app db script spec" - -inherit ruby-fakegem - -DESCRIPTION="The database layer for Metasploit" -HOMEPAGE="https://github.com/rapid7/metasploit_data_models" -SRC_URI="https://github.com/rapid7/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~arm ~x86" -IUSE="" - -ruby_add_rdepend " - >=dev-ruby/activerecord-3.2.10[postgres] - dev-ruby/activesupport" diff --git a/dev-ruby/metasploit_data_models/metasploit_data_models-1.2.5.ebuild b/dev-ruby/metasploit_data_models/metasploit_data_models-1.2.5.ebuild new file mode 100644 index 000000000000..3fff46ca762b --- /dev/null +++ b/dev-ruby/metasploit_data_models/metasploit_data_models-1.2.5.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/metasploit_data_models/metasploit_data_models-0.17.0.ebuild,v 1.3 2014/07/09 21:13:54 zerochaos Exp $ + +EAPI=5 +USE_RUBY="ruby19 ruby20 ruby21" + +inherit ruby-fakegem versionator + +RUBY_FAKEGEM_EXTRAINSTALL="app config db script spec" + +DESCRIPTION="The database layer for Metasploit" +HOMEPAGE="https://github.com/rapid7/metasploit_data_models" +SRC_URI="mirror://rubygems/${P}.gem" + +LICENSE="BSD" +SLOT="$(get_version_component_range 1-2)" +KEYWORDS="~amd64 ~x86" +RESTRICT=test +#IUSE="development test" +IUSE="" + +RDEPEND="${RDEPEND} !dev-ruby/metasploit_data_models:0" + +ruby_add_rdepend " + >=dev-ruby/activerecord-4.0.9:4.0[postgres] + >=dev-ruby/activesupport-4.0.9:4.0 + dev-ruby/pg + dev-ruby/postgres_ext + >=dev-ruby/railties-4.0.9:4.0 + dev-ruby/recog + dev-ruby/arel-helpers + >=dev-ruby/metasploit-concern-1.0.0:1.0 + >=dev-ruby/metasploit-model-1.0.0:1.0 + + + + + zerochaos@gentoo.org + Rick Farina + + + + + dockyard/pg_array_parser + + diff --git a/dev-ruby/pg_array_parser/pg_array_parser-0.0.9.ebuild b/dev-ruby/pg_array_parser/pg_array_parser-0.0.9.ebuild new file mode 100644 index 000000000000..723e34ec052e --- /dev/null +++ b/dev-ruby/pg_array_parser/pg_array_parser-0.0.9.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: Exp $ + +EAPI=5 +USE_RUBY="ruby19 ruby20 ruby21" + +inherit ruby-fakegem versionator + +DESCRIPTION="Simple library to parse PostgreSQL arrays into a array of strings" +HOMEPAGE="https://github.com/dockyard/pg_array_parser" +SRC_URI="mirror://rubygems/${P}.gem" + +LICENSE="BSD" +SLOT="$(get_version_component_range 1-3)" +KEYWORDS="~amd64 ~x86" +IUSE="" +RESTRICT=test + +ruby_add_bdepend "dev-ruby/bundler" + +all_ruby_prepare() { + [ -f Gemfile.lock ] && rm Gemfile.lock + #if ! use development; then + sed -i -e "/^group :development do/,/^end$/d" Gemfile || die + sed -i -e "/s.add_development_dependency/d" "${PN}".gemspec || die + sed -i -e "/gem.add_development_dependency/d" "${PN}".gemspec || die + #fi + #if ! use test; then + sed -i -e "/^group :test do/,/^end$/d" Gemfile || die + #fi + #if ! use test && ! use development; then + sed -i -e "/^group :development, :test do/,/^end$/d" Gemfile || die + #fi +} + +each_ruby_prepare() { + if [ -f Gemfile ]; then + BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle install --local || die + BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle check || die + fi +} diff --git a/dev-ruby/postgres_ext/Manifest b/dev-ruby/postgres_ext/Manifest new file mode 100644 index 000000000000..a0525a902f8e --- /dev/null +++ b/dev-ruby/postgres_ext/Manifest @@ -0,0 +1 @@ +DIST postgres_ext-2.4.1.gem 20992 SHA256 41d5bd383537e90833005f87fe502843ee7097c5a981e81f7ed8464635d89df3 SHA512 e8a0b2990e2939f600c92bfae70ebfb142875ca3b86d6d6ad95bc8bbaf350df8c2fde5173f51ff71616e5b68d7d852d1f4b201573c05afa39aa4134c9cb4ef75 WHIRLPOOL 8d2126b0717c7f4311bd171542dd76db8d56c6b07cdd05400af7130a9e8f06df324faf4ca5aacbddfb31fdfeedf2e40bb9f960f1cbd515f3687dbe5a31c1a622 diff --git a/dev-ruby/postgres_ext/metadata.xml b/dev-ruby/postgres_ext/metadata.xml new file mode 100644 index 000000000000..5ff2ea70d7e1 --- /dev/null +++ b/dev-ruby/postgres_ext/metadata.xml @@ -0,0 +1,13 @@ + + + + + zerochaos@gentoo.org + Rick Farina + + + + + dockyard/postgres_ext + + diff --git a/dev-ruby/postgres_ext/postgres_ext-2.4.1.ebuild b/dev-ruby/postgres_ext/postgres_ext-2.4.1.ebuild new file mode 100644 index 000000000000..a009b828757a --- /dev/null +++ b/dev-ruby/postgres_ext/postgres_ext-2.4.1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: Exp $ + +EAPI=5 +USE_RUBY="ruby19 ruby20 ruby21" + +inherit ruby-fakegem versionator + +DESCRIPTION="Adds native PostgreSQL data types to ActiveRecord and querying extensions for ActiveRecord and Arel" +HOMEPAGE="https://github.com/dockyard/postgres_ext" +SRC_URI="mirror://rubygems/${P}.gem" + +LICENSE="BSD" +SLOT="$(get_version_component_range 1-2)" +KEYWORDS="~amd64 ~x86" +IUSE="" +RESTRICT=test + +ruby_add_rdepend "|| ( dev-ruby/activerecord:4.1 dev-ruby/activerecord:4.2 ) + >=dev-ruby/arel-4.0.1:* + dev-ruby/pg_array_parser:0.0.9" + +ruby_add_bdepend "dev-ruby/bundler" + +all_ruby_prepare() { + [ -f Gemfile.lock ] && rm Gemfile.lock + #if ! use development; then + sed -i -e "/^group :development do/,/^end$/d" Gemfile || die + sed -i -e "/s.add_development_dependency/d" "${PN}".gemspec || die + sed -i -e "/gem.add_development_dependency/d" "${PN}".gemspec || die + #fi + #if ! use test; then + sed -i -e "/^group :test do/,/^end$/d" Gemfile || die + #fi + #if ! use test && ! use development; then + sed -i -e "/^group :development, :test do/,/^end$/d" Gemfile || die + #fi + #https://github.com/dockyard/postgres_ext/issues/166 + #ugh, thanks + sed -i -e "/byebug/d" Gemfile || die + sed -i -e "/fivemat/d" Gemfile || die +} + +each_ruby_prepare() { + if [ -f Gemfile ]; then + BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle install --local || die + BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle check || die + fi +} diff --git a/dev-ruby/rb-readline-r7/Manifest b/dev-ruby/rb-readline-r7/Manifest new file mode 100644 index 000000000000..10f0f5284750 --- /dev/null +++ b/dev-ruby/rb-readline-r7/Manifest @@ -0,0 +1 @@ +DIST rb-readline-r7-0.5.2.0.gem 96256 SHA256 ea2f63086533f370020087f6ca198b91699a254e79b2f69ba792a2829dffa339 SHA512 e94b60e368104f5e626a5c98dbe894cea52294b9c2061aa0cf32c34b7575a1ba9b0c514221ce266be89553d7936fc82696fc979710b9e8bb2503fc8b3cc0a938 WHIRLPOOL c9556322f6d3ca36674d46c1d9b49680cb76bf642ebf0369df1931503d83ac4b4a6f242d889d1f6f03a59aca6b8decd9598d25f2c1a97f45b8492b6c498fd17c diff --git a/dev-ruby/rb-readline-r7/metadata.xml b/dev-ruby/rb-readline-r7/metadata.xml new file mode 100644 index 000000000000..92f9b7f67593 --- /dev/null +++ b/dev-ruby/rb-readline-r7/metadata.xml @@ -0,0 +1,13 @@ + + + + + zerochaos@gentoo.org + Rick Farina + + + + + rapid7/rb-readline + + diff --git a/dev-ruby/rb-readline-r7/rb-readline-r7-0.5.2.0.ebuild b/dev-ruby/rb-readline-r7/rb-readline-r7-0.5.2.0.ebuild new file mode 100644 index 000000000000..4435817e5101 --- /dev/null +++ b/dev-ruby/rb-readline-r7/rb-readline-r7-0.5.2.0.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rb-readline/rb-readline-0.5.2.ebuild,v 1.1 2015/01/01 07:53:09 graaff Exp $ + +EAPI=5 +USE_RUBY="ruby19 ruby20 ruby21 ruby22" + +RUBY_FAKEGEM_RECIPE_DOC="rdoc" +inherit ruby-fakegem + +DESCRIPTION="Ruby implementation of the GNU readline C library forked by r7" +HOMEPAGE="http://rubygems.org/gems/rb-readline-r7" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="" +DEPEND="test? ( dev-ruby/minitest + dev-ruby/rake )" + +all_ruby_prepare() { + # Skip a test that fails when run in the ebuild environment. + sed -i -e '/test_readline_with_default_parameters_does_not_error/,/end/ s:^:#:' test/test_readline.rb || die +} diff --git a/dev-ruby/recog/Manifest b/dev-ruby/recog/Manifest new file mode 100644 index 000000000000..63227be8198c --- /dev/null +++ b/dev-ruby/recog/Manifest @@ -0,0 +1 @@ +DIST recog-2.0.6.gem 188928 SHA256 333d867db310b908342f857ee4f3f60b869386ff7b908e06f4dec8b9352ceb97 SHA512 408e83889632127d584ce8d09244c63246807aa5f89d88c082bbfd441a2e708cd67f23aebf23fa08c5db6bfd7ff771071daf64df9a66224aa5f04fcaba3d1387 WHIRLPOOL 2aaef470b15e3b8ac99d99bc3f8975447d5aa3d05220540d61f4972083f8cf6a0b04ba89e88aefc0dfd355f59f6f1bd5e9754bf00b6b5a5a953ef21f42fc3509 diff --git a/dev-ruby/recog/metadata.xml b/dev-ruby/recog/metadata.xml new file mode 100644 index 000000000000..839af48d6ad5 --- /dev/null +++ b/dev-ruby/recog/metadata.xml @@ -0,0 +1,13 @@ + + + + + zerochaos@gentoo.org + Rick Farina + + + + + rapid7/recog + + diff --git a/dev-ruby/recog/recog-2.0.6.ebuild b/dev-ruby/recog/recog-2.0.6.ebuild new file mode 100644 index 000000000000..d59a1567babd --- /dev/null +++ b/dev-ruby/recog/recog-2.0.6.ebuild @@ -0,0 +1,19 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 +USE_RUBY="ruby19 ruby20 ruby21" + +inherit ruby-fakegem + +DESCRIPTION="Pattern recognition for hosts, services, and content" +HOMEPAGE="https://github.com/rapid7/${PN}" +SRC_URI="mirror://rubygems/${P}.gem" + +LICENSE="BSD" +SLOT="2" +KEYWORDS="~amd64 ~x86" +IUSE="" + +ruby_add_rdepend "dev-ruby/nokogiri !=dev-ruby/recog-2.0.0" diff --git a/dev-ruby/rubyntlm/Manifest b/dev-ruby/rubyntlm/Manifest new file mode 100644 index 000000000000..2ebd2b1736dd --- /dev/null +++ b/dev-ruby/rubyntlm/Manifest @@ -0,0 +1 @@ +DIST rubyntlm-0.4.0.gem 21504 SHA256 bd10dcab5f1166e10049f0649a28f49bcc56c0592683d094a2852dd62b8ab50f SHA512 33a845b3b898d5e45ef51d4c3ab9a928789d2506c9854dedac2afb71b639abd91054c89357a0f33f975984172b8b7bf58c22a6ec50e4ab423d3269910284151e WHIRLPOOL a67927dde3fc3b539640d5d346e239c4fd0db4c0f3e7af1836c619ee942920a9f5f7c26e7035d0dfe9ef98de610fefb945ab6ed480403437e94af4ac6a64e59f diff --git a/dev-ruby/rubyntlm/metadata.xml b/dev-ruby/rubyntlm/metadata.xml new file mode 100644 index 000000000000..3c8603ea0821 --- /dev/null +++ b/dev-ruby/rubyntlm/metadata.xml @@ -0,0 +1,13 @@ + + + + + zerochaos@gentoo.org + Rick Farina + + + + + winrb/rubyntlm + + diff --git a/dev-ruby/rubyntlm/rubyntlm-0.4.0.ebuild b/dev-ruby/rubyntlm/rubyntlm-0.4.0.ebuild new file mode 100644 index 000000000000..1adcaf3a1746 --- /dev/null +++ b/dev-ruby/rubyntlm/rubyntlm-0.4.0.ebuild @@ -0,0 +1,17 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/metasploit_data_models/metasploit_data_models-0.17.0.ebuild,v 1.3 2014/07/09 21:13:54 zerochaos Exp $ + +EAPI=5 +USE_RUBY="ruby19 ruby20 ruby21" + +inherit ruby-fakegem + +DESCRIPTION="Ruby/NTLM provides message creator and parser for the NTLM authentication." +HOMEPAGE="http://rubygems.org/gems/rubyntlm" +SRC_URI="mirror://rubygems/${P}.gem" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" diff --git a/net-analyzer/metasploit/Manifest b/net-analyzer/metasploit/Manifest index 67678608b417..7b154fdb3042 100644 --- a/net-analyzer/metasploit/Manifest +++ b/net-analyzer/metasploit/Manifest @@ -1,2 +1,2 @@ DIST framework-2.7.tar.gz 5800216 SHA256 516952772aaa8982628460b927c9119850925f870903c5a131a9c9f0390cf77f SHA512 a65740c81e6c711e6661170ec0dd87919cad6c4aa3aaac08fdaa72b4825be4bea28ec09c78f818ddab7660f5b485b13f87e3175b43c625319ce89b044a40f2a0 WHIRLPOOL f309608e30488484b24555fec84e65ed0dcbeba62a69e6ec23c507dbc0fcf720551a795e2a0793886fcd38d3a9b160819c864720155f58f274577b0246f05946 -DIST framework-4.9.3.tar.bz2 36334540 SHA256 76aa4651b8235a018ccb46b31974fa8785e3d16bd753ac34d66fa60468d304b3 SHA512 a16608c718c57913fa5206032ca3707504f83fb25e1a9aec93dbec8d799c7d600f8f2eafb6882bddf64082a19bf9ad39b461c180946499f4e4821f249270ee6f WHIRLPOOL cd4fa596e810a63ee16147f7c4acd3af9b6389732159721c1ce560233ff0a2364964fa56393fbc2e5dc6d0ba161a484c5b7c02603cd23da081ea896c4fd7370e +DIST metasploit-4.11.4_p2015090201.tar.gz 35211994 SHA256 1254dbb3e8cf33c7a6c8c701a0be13f78bbd2234503e636f1afacf88676aeea2 SHA512 b96c9735ef579b5f98d1fd7176f91bb1710d263a19d3ff891877df8e341baa1749d5fdce9825a19d9ecbe162b72ebcd11336d4d7884e066f4e199baaff8b4085 WHIRLPOOL 875db5df25112736dd62ec1195080d2567a670cf3a770e787b70c364c6b30b43bf906f7ba35901ff367ce940b02af7b17ae135693a28ff5fca9fc05038132ae2 diff --git a/net-analyzer/metasploit/metadata.xml b/net-analyzer/metasploit/metadata.xml index 9ba0d4a92316..c118704ddaef 100644 --- a/net-analyzer/metasploit/metadata.xml +++ b/net-analyzer/metasploit/metadata.xml @@ -8,7 +8,6 @@ Install dependencies needed for metasploit and exploit development - Enable lorcon for raw packet injection Enable restricted oracle modules which have additional deps Enable libpcap for packet sniffing diff --git a/net-analyzer/metasploit/metasploit-9999.ebuild b/net-analyzer/metasploit/metasploit-4.11.4_p2015090201.ebuild similarity index 78% rename from net-analyzer/metasploit/metasploit-9999.ebuild rename to net-analyzer/metasploit/metasploit-4.11.4_p2015090201.ebuild index 38ea5e220bf6..5e6046d55a4e 100644 --- a/net-analyzer/metasploit/metasploit-9999.ebuild +++ b/net-analyzer/metasploit/metasploit-4.11.4_p2015090201.ebuild @@ -1,63 +1,79 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id$ +# $Header: $ EAPI="5" +#never ever ever have more than one ruby in here +USE_RUBY="ruby21" +inherit eutils ruby-ng + if [[ ${PV} == "9999" ]] ; then EGIT_REPO_URI="https://github.com/rapid7/metasploit-framework.git" EGIT_CHECKOUT_DIR="${WORKDIR}"/all inherit git-r3 KEYWORDS="" + SLOT="9999" else - #https://github.com/rapid7/metasploit-framework/wiki/Downloads-by-Version - SRC_URI="http://downloads.metasploit.com/data/releases/archive/framework-${PV}.tar.bz2" - KEYWORDS="~amd64 ~arm ~x86" - S="${WORKDIR}"/msf3 + ##Tags https://github.com/rapid7/metasploit-framework/releases + ##Releases https://github.com/rapid7/metasploit-framework/wiki/Downloads-by-Version + #SRC_URI="https://github.com/rapid7/metasploit-framework/archive/${PV}.tar.gz -> ${P}.tar.gz" + ##Snapshots + MY_PV=${PV/_p/-} + SRC_URI="https://github.com/rapid7/metasploit-framework/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" + RUBY_S="${PN}-framework-${MY_PV}" + inherit versionator + SLOT="$(get_version_component_range 1).$(get_version_component_range 2)" fi -#ruby20 doesn't have wide enough support in gentoo yet (but is semi-supported upstream) -USE_RUBY="ruby19" -inherit eutils ruby-ng - DESCRIPTION="Advanced open-source framework for developing, testing, and using vulnerability exploit code" HOMEPAGE="http://www.metasploit.org/" -SLOT="9999" LICENSE="BSD" -IUSE="development +java lorcon oracle +pcap test" +IUSE="development +java oracle +pcap test" #multiple known bugs with tests reported upstream and ignored #http://dev.metasploit.com/redmine/issues/8418 - worked around (fix user creation when possible) RESTRICT="test" RUBY_COMMON_DEPEND="virtual/ruby-ssl - dev-ruby/activesupport:3.2 - dev-ruby/activerecord:3.2 + >=dev-ruby/activesupport-4.0.9:4.0 + >=dev-ruby/actionpack-4.0.9:4.0 + >=dev-ruby/activerecord-4.0.9:4.0 dev-ruby/bcrypt-ruby dev-ruby/builder:3 dev-ruby/bundler + =dev-ruby/jsobfu-0.2* dev-ruby/json dev-ruby/kissfft - =dev-ruby/metasploit_data_models-0.17.0 - =dev-ruby/meterpreter_bins-0.0.6 + =dev-ruby/metasploit_data_models-1.2.5 + dev-ruby/meterpreter_bins:0.0.22 + dev-ruby/metasploit-payloads:1.0.9 + >=dev-ruby/metasploit-credential-1.0.0:1.0 + >=dev-ruby/metasploit-concern-1.0.0:1.0 + >=dev-ruby/metasploit-model-1.0.0:1.0 dev-ruby/msgpack dev-ruby/nokogiri + =dev-ruby/recog-2.0.6:2 =dev-ruby/rkelly-remix-0.0.6 dev-ruby/sqlite3 >=dev-ruby/pg-0.11 =dev-ruby/packetfu-1.1.9 - dev-ruby/rb-readline + >=dev-ruby/rubyzip-1.1 + dev-ruby/rb-readline-r7 dev-ruby/robots java? ( dev-ruby/rjb ) - lorcon? ( net-wireless/lorcon[ruby] ) oracle? ( dev-ruby/ruby-oci8 ) pcap? ( dev-ruby/pcaprub dev-ruby/network_interface ) development? ( dev-ruby/fivemat + dev-ruby/pry dev-ruby/redcarpet dev-ruby/yard >=dev-ruby/rake-10.0.0 >=dev-ruby/factory_girl-4.1.0 )" + #lorcon doesn't support ruby21 + #lorcon? ( net-wireless/lorcon[ruby] ) ruby_add_bdepend "${RUBY_COMMON_DEPEND} test? ( >=dev-ruby/factory_girl-4.1.0 dev-ruby/fivemat @@ -71,9 +87,8 @@ ruby_add_rdepend "${RUBY_COMMON_DEPEND}" COMMON_DEPEND="dev-db/postgresql[server] >=app-crypt/johntheripper-1.7.9-r1[-minimal] net-analyzer/nmap" -DEPEND+=" ${COMMON_DEPEND}" RDEPEND+=" ${COMMON_DEPEND} - >=app-eselect/eselect-metasploit-0.13" + >=app-eselect/eselect-metasploit-0.16" RESTRICT="strip" @@ -82,7 +97,9 @@ QA_PREBUILT=" usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_armle_linux.bin usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_solaris.bin usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x64_linux.bin + usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x64_linux_dll.bin usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_bsd.bin + usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x64_bsd.bin usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_mipsbe_linux.bin usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_mipsle_linux.bin usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/msflinker_linux_x86.bin @@ -90,6 +107,7 @@ QA_PREBUILT=" usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_networkpug.lso usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_stdapi.lso usr/$(get_libdir)/${PN}${SLOT}/data/exploits/CVE-2013-2171.bin + usr/$(get_libdir)/${PN}${SLOT}/data/exploits/CVE-2014-3153.elf usr/$(get_libdir)/${PN}${SLOT}/data/android/libs/x86/libndkstager.so usr/$(get_libdir)/${PN}${SLOT}/data/android/libs/mips/libndkstager.so usr/$(get_libdir)/${PN}${SLOT}/data/android/libs/armeabi/libndkstager.so @@ -113,8 +131,10 @@ all_ruby_unpack() { git-r3_src_unpack else default_src_unpack - mv "${WORKDIR}"/all/msf3/* "${WORKDIR}"/all - rm -r msf3 +# mv "${WORKDIR}"/all/msf3/* "${WORKDIR}"/all +# rm -r msf3 + #msf_version=$(grep --color=never "CURRENT_VERSION =" ${S}/spec/lib/msf/core/framework_spec.rb) + #msf_version=${msf_version#*=} fi } @@ -138,12 +158,14 @@ all_ruby_prepare() { rm Gemfile.lock #The Gemfile contains real known deps #add our dep on upstream rb-readline instead of bundled one - sed -i "/gem 'packetfu'/a #use upstream readline instead of bundled\ngem 'rb-readline'" Gemfile || die + #and then they broke it... + #sed -i "/gem 'packetfu'/a #use upstream readline instead of bundled\ngem 'rb-readline'" Gemfile || die sed -i "/gem 'fivemat'/s/, '1.2.1'//" Gemfile || die #remove the bundled readline #https://github.com/rapid7/metasploit-framework/pull/3105 #this PR was closed due to numerous changes to their local fork, almost entirely for non-linux - rm lib/rbreadline.rb + #but now we have to go back to bundled readline because otherwise it's broken + #rm lib/rbreadline.rb #now we edit the Gemfile based on use flags #even if we pass --without=blah bundler still calculates the deps and messes us up if ! use pcap; then @@ -158,11 +180,13 @@ all_ruby_prepare() { if ! use test && ! use development; then sed -i -e "/^group :development/,/^end$/d" Gemfile || die fi - if use test; then - #We don't need simplecov - sed -i -e "s#gem 'simplecov', '0.5.4', :require => false##" Gemfile || die - sed -i -e "s#require 'simplecov'##" spec/spec_helper.rb || die - fi + #We don't need simplecov + sed -i -e "/^group :coverage/,/^end$/d" Gemfile || die + sed -i -e "s#require 'simplecov'##" spec/spec_helper.rb || die + + #we need to edit the gemspec too, since it tries to call git instead of anything sane + #probably a better way to fix this... if I care at some point + sed -i -e "/^ spec.files/,/^ }/d" metasploit-framework.gemspec || die #let's bogart msfupdate rm msfupdate @@ -191,10 +215,10 @@ all_ruby_prepare() { } each_ruby_prepare() { - BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle install --local || die - BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle check || die + MSF_ROOT="." BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle install --local || die + MSF_ROOT="." BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle check || die - #force all metasploit executables to ruby19, ruby18 is not supported anymore and ruby20 is not supported yet + #force all metasploit executables to use desired ruby version #https://dev.metasploit.com/redmine/issues/8357 for file in $(ls -1 msf*) do @@ -248,7 +272,6 @@ all_ruby_install() { #These dirs contain prebuilt binaries for running on the TARGET not the HOST SEARCH_DIRS_MASK="/usr/lib*/${PN}${SLOT}/data/meterpreter" SEARCH_DIRS_MASK="/usr/lib*/${PN}${SLOT}/data/exploits" - SEARCH_DIRS_MASK="/usr/lib*/${PN}${SLOT}/data/android/libs" EOF } @@ -257,7 +280,7 @@ pkg_postinst() { elog "otherwise you may be missing important environmental variables." elog "You need to prepare the database by running:" - elog "emerge --config postgresql-server" + elog "emerge --config postgresql" elog "/etc/init.d/postgresql- start" elog "emerge --config =metasploit-${PV}" diff --git a/net-analyzer/metasploit/metasploit-4.9.3.ebuild b/net-analyzer/metasploit/metasploit-4.9.3.ebuild deleted file mode 100644 index 4450ae20cae9..000000000000 --- a/net-analyzer/metasploit/metasploit-4.9.3.ebuild +++ /dev/null @@ -1,273 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI="5" - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://github.com/rapid7/metasploit-framework.git" - EGIT_CHECKOUT_DIR="${WORKDIR}"/all - inherit git-r3 - KEYWORDS="" -else - #https://github.com/rapid7/metasploit-framework/wiki/Downloads-by-Version - SRC_URI="http://downloads.metasploit.com/data/releases/archive/framework-${PV}.tar.bz2" - KEYWORDS="~amd64 ~arm ~x86" - S="${WORKDIR}"/msf3 -fi - -#ruby20 doesn't have wide enough support in gentoo yet (but is semi-supported upstream) -USE_RUBY="ruby19" -inherit eutils ruby-ng - -DESCRIPTION="Advanced open-source framework for developing, testing, and using vulnerability exploit code" -HOMEPAGE="http://www.metasploit.org/" -SLOT="4.9" -LICENSE="BSD" -IUSE="development +java lorcon oracle +pcap test" - -#multiple known bugs with tests reported upstream and ignored -#http://dev.metasploit.com/redmine/issues/8418 - worked around (fix user creation when possible) -RESTRICT="test" - -RUBY_COMMON_DEPEND="virtual/ruby-ssl - =dev-ruby/rkelly-remix-0.0.6 - dev-ruby/bcrypt-ruby - dev-ruby/activesupport:3.2 - dev-ruby/activerecord:3.2 - dev-ruby/json - =dev-ruby/metasploit_data_models-0.17.0 - dev-ruby/msgpack - dev-ruby/nokogiri - dev-ruby/sqlite3 - dev-ruby/builder:3 - >=dev-ruby/pg-0.11 - =dev-ruby/packetfu-1.1.9 - dev-ruby/rb-readline - dev-ruby/robots - dev-ruby/kissfft - java? ( dev-ruby/rjb ) - lorcon? ( net-wireless/lorcon[ruby] ) - oracle? ( dev-ruby/ruby-oci8 ) - pcap? ( dev-ruby/pcaprub - dev-ruby/network_interface ) - dev-ruby/bundler - development? ( dev-ruby/fivemat - dev-ruby/redcarpet - dev-ruby/yard - >=dev-ruby/rake-10.0.0 - >=dev-ruby/factory_girl-4.1.0 )" -ruby_add_bdepend "${RUBY_COMMON_DEPEND} - test? ( >=dev-ruby/factory_girl-4.1.0 - dev-ruby/fivemat - dev-ruby/database_cleaner - >=dev-ruby/rspec-2.12 - dev-ruby/shoulda-matchers - dev-ruby/timecop - >=dev-ruby/rake-10.0.0 )" -ruby_add_rdepend "${RUBY_COMMON_DEPEND}" - -COMMON_DEPEND="dev-db/postgresql[server] - >=app-crypt/johntheripper-1.7.9-r1[-minimal] - net-analyzer/nmap" -DEPEND+=" ${COMMON_DEPEND}" -RDEPEND+=" ${COMMON_DEPEND} - >=app-eselect/eselect-metasploit-0.13" - -RESTRICT="strip" - -QA_PREBUILT=" - usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_linux.bin - usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_armle_linux.bin - usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_solaris.bin - usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x64_linux.bin - usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_bsd.bin - usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_mipsbe_linux.bin - usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_mipsle_linux.bin - usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/msflinker_linux_x86.bin - usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_sniffer.lso - usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_networkpug.lso - usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_stdapi.lso - usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_linux.bin - usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_armle_linux.bin - usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_solaris.bin - usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x64_linux.bin - usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_bsd.bin - usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/msflinker_linux_x86.bin - usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_sniffer.lso - usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_networkpug.lso - usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_stdapi.lso - usr/$(get_libdir)/${PN}${SLOT}/data/exploits/CVE-2013-2171.bin - " - -pkg_setup() { - if use test; then - su postgres -c "dropdb msf_test_database" #this is intentionally allowed to fail - su postgres -c "createuser msf_test_user -d -S -R" - if [ $? -ne 0 ]; then - su postgres -c "dropuser msf_test_user" || die - su postgres -c "createuser msf_test_user -d -S -R" || die - fi - su postgres -c "createdb --owner=msf_test_user msf_test_database" || die - fi - ruby-ng_pkg_setup -} - -all_ruby_unpack() { - if [[ ${PV} == "9999" ]] ; then - git-r3_src_unpack - else - default_src_unpack - mv "${WORKDIR}"/all/msf3/* "${WORKDIR}"/all - rm -r msf3 - fi -} - -all_ruby_prepare() { - # add psexec patch from pull request 2657 to allow custom exe templates from any files, bypassing most AVs - #epatch "${FILESDIR}/agix_psexec_pull-2657.patch" - epatch_user - - #unbundle johntheripper, at least it now defaults to running the system version - rm -r data/john/run.* - rm -r data/john/src.tar.bz2 - #remove random "cpuinfo" binaries which a only needed to detect which bundled john to run - rm -r data/cpuinfo - - #remove random oudated collected garbage - rm -r external - - #remove unneeded ruby bundler versioning files - #Gemfile.lock contains the versions tested by the msf team but not the hard requirements - #we regen this file in each_ruby_prepare - rm Gemfile.lock - #The Gemfile contains real known deps - #add our dep on upstream rb-readline instead of bundled one - sed -i "/gem 'packetfu'/a #use upstream readline instead of bundled\ngem 'rb-readline'" Gemfile || die - sed -i "/gem 'fivemat'/s/, '1.2.1'//" Gemfile || die - #remove the bundled readline - #https://github.com/rapid7/metasploit-framework/pull/3105 - #this PR was closed due to numerous changes to their local fork, almost entirely for non-linux - rm lib/rbreadline.rb - #now we edit the Gemfile based on use flags - #even if we pass --without=blah bundler still calculates the deps and messes us up - if ! use pcap; then - sed -i -e "/^group :pcap do/,/^end$/d" Gemfile || die - fi - if ! use development; then - sed -i -e "/^group :development do/,/^end$/d" Gemfile || die - fi - if ! use test; then - sed -i -e "/^group :test/,/^end$/d" Gemfile || die - fi - if ! use test && ! use development; then - sed -i -e "/^group :development/,/^end$/d" Gemfile || die - fi - if use test; then - #We don't need simplecov - sed -i -e "s#gem 'simplecov', '0.5.4', :require => false##" Gemfile || die - sed -i -e "s#require 'simplecov'##" spec/spec_helper.rb || die - fi - - #let's bogart msfupdate - rm msfupdate - echo "#!/bin/sh" > msfupdate - echo "echo \"[*]\"" >> msfupdate - echo "echo \"[*] Attempting to update the Metasploit Framework...\"" >> msfupdate - echo "echo \"[*]\"" >> msfupdate - echo "echo \"\"" >> msfupdate - if [[ ${PV} == "9999" ]] ; then - echo "emerge --oneshot \"=${CATEGORY}/${PF}\"" >> msfupdate - else - echo "echo \"Unable to update tagged version of metasploit.\"" >> msfupdate - echo "echo \"If you want the latest please install and eselect the live version (metasploit9999)\"" >> msfupdate - echo "echo \"emerge metasploit:9999 -vat && eselect metasploit set metasploit9999\"" >> msfupdate - fi - #this is set executable in src_install - - #install our database.yml file before tests are run - cp "${FILESDIR}"/database.yml config/ - -} - -each_ruby_prepare() { - ${RUBY} -S bundle install --local || die - ${RUBY} -S bundle check || die - - #force all metasploit executables to ruby19, ruby18 is not supported anymore and ruby20 is not supported yet - #https://dev.metasploit.com/redmine/issues/8357 - for file in $(ls -1 msf*) - do - #poorly adapted from python.eclass - sed -e "1s:^#![[:space:]]*\([^[:space:]]*/usr/bin/env[[:space:]]\)\?[[:space:]]*\([^[:space:]]*/\)\?ruby\([[:digit:]]\+\(\.[[:digit:]]\+\)\?\)\?\(\$\|[[:space:]].*\):#!\1\2${RUBY}:" -i "${file}" || die "Conversion of shebang in '${file}' failed" - done -} - -each_ruby_test() { - #review dev-python/pymongo for ways to make the test compatible with FEATURES=network-sandbox - - #we bogart msfupdate so no point in trying to test it - rm spec/msfupdate_spec.rb || die - #we don't really want to be uploading to virustotal during the tests - rm spec/tools/virustotal_spec.rb || die - - # https://dev.metasploit.com/redmine/issues/8425 - ${RUBY} -S bundle exec rake db:create || die - ${RUBY} -S bundle exec rake db:migrate || die - - MSF_DATABASE_CONFIG=config/database.yml ${RUBY} -S bundle exec rake || die - su postgres -c "dropuser msf_test_user" || die "failed to cleanup msf_test-user" -} - -each_ruby_install() { - #Tests have already been run, we don't need this stuff - rm -r spec || die - rm -r test || die - rm Gemfile.lock || die - - #I'm 99% sure that this will only work for as long as we only support one ruby version. Creativity will be needed if we wish to support multiple. - # should be as simple as copying everything into the target... - dodir /usr/$(get_libdir)/${PN}${SLOT} - cp -R * "${ED}"/usr/$(get_libdir)/${PN}${SLOT} || die "Copy files failed" - rm -Rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/documentation "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/README.md - fowners -R root:0 / - -} - -all_ruby_install() { - # do not remove LICENSE, bug #238137 - dodir /usr/share/doc/${PF} - cp -R {documentation,README.md} "${ED}"/usr/share/doc/${PF} || die - dosym /usr/share/doc/${PF}/documentation /usr/$(get_libdir)/${PN}${SLOT}/documentation - - fperms +x /usr/$(get_libdir)/${PN}${SLOT}/msfupdate - - #tell revdep-rebuild to ignore binaries meant for the target - dodir /etc/revdep-rebuild - cat <<-EOF > "${ED}"/etc/revdep-rebuild/99-metasploit${SLOT} - #These dirs contain prebuilt binaries for running on the TARGET not the HOST - SEARCH_DIRS_MASK="/usr/lib*/${PN}${SLOT}/data/meterpreter" - SEARCH_DIRS_MASK="/usr/lib*/${PN}${SLOT}/data/exploits" - EOF -} - -pkg_postinst() { - elog "Before use you should run 'env-update' and '. /etc/profile'" - elog "otherwise you may be missing important environmental variables." - - elog "You need to prepare the database by running:" - elog "emerge --config postgresql-server" - elog "/etc/init.d/postgresql- start" - elog "emerge --config =metasploit-${PV}" - - "${EROOT}"/usr/bin/eselect metasploit set --use-old ${PN}${SLOT} - - einfo - elog "Adjust /usr/lib/${PN}${SLOT}/config/database.yml if necessary" -} - -pkg_config() { - einfo "If the following fails, it is likely because you forgot to start/config postgresql first" - su postgres -c "createuser msf_user -D -S -R" - su postgres -c "createdb --owner=msf_user msf_database" -} -- 2.26.2