diff --git a/dev-ruby/metasploit-concern/Manifest b/dev-ruby/metasploit-concern/Manifest
new file mode 100644
index 000000000..3053b5cc4
--- /dev/null
+++ b/dev-ruby/metasploit-concern/Manifest
@@ -0,0 +1 @@
+DIST metasploit-concern-3.0.0.gem 18944 BLAKE2B 769f5d7f1df51021624a9c2a62db98b83e03a319a887fcb96689c9525c8b7e2a295ce7f9c0c58aca197263759698b356086327a8b9776daf16819defa697e9b6 SHA512 0de97f7131e1d92a34b4f091aadd5779cf75037445c9d4c3460810747c65b64f872757414fedd13d9aef7b978efc9d0dd0fc3d24e286e0d4ab628d6187a68483
diff --git a/dev-ruby/metasploit-concern/metadata.xml b/dev-ruby/metasploit-concern/metadata.xml
new file mode 100644
index 000000000..0f151a8a9
--- /dev/null
+++ b/dev-ruby/metasploit-concern/metadata.xml
@@ -0,0 +1,11 @@
+
+
+
+
+ zerochaos@gentoo.org
+ Rick Farina
+
+
+ rapid7/metasploit-concern
+
+
diff --git a/dev-ruby/metasploit-concern/metasploit-concern-3.0.0.ebuild b/dev-ruby/metasploit-concern/metasploit-concern-3.0.0.ebuild
new file mode 100644
index 000000000..43b9d6f83
--- /dev/null
+++ b/dev-ruby/metasploit-concern/metasploit-concern-3.0.0.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+USE_RUBY="ruby25 ruby26"
+
+RUBY_FAKEGEM_EXTRAINSTALL="app spec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Metasploit concern allows you to define concerns in app/concerns. "
+HOMEPAGE="https://github.com/rapid7/metasploit-concern"
+SRC_URI="https://rubygems.org/gems/${P}.gem"
+
+LICENSE="BSD"
+SLOT="$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~arm ~x86"
+#IUSE="development test"
+RESTRICT=test
+IUSE=""
+
+RDEPEND="${RDEPEND} !dev-ruby/metasploit-concern:0"
+
+ruby_add_rdepend ">=dev-ruby/railties-5.2.2:5.2
+ >=dev-ruby/activesupport-5.2.2:5.2
+ >=dev-ruby/activemodel-5.2.2:5.2"
diff --git a/dev-ruby/metasploit-credential/Manifest b/dev-ruby/metasploit-credential/Manifest
new file mode 100644
index 000000000..e8acb941b
--- /dev/null
+++ b/dev-ruby/metasploit-credential/Manifest
@@ -0,0 +1 @@
+DIST metasploit-credential-4.0.2.gem 109568 BLAKE2B ecd8a7ff9366a79b47dc14db69ec87e44354893c67acf7cc92fc386ad04e663812552270d5cd04f2926039fcdd7ddc170ba93e12a81a152d8661975c76f6fa93 SHA512 57f857b7db710ef6e94e79849fb56af7b45b0f8b97030996cb50384b759b1e0d535391b3fd3c7aa6a530d671d109b01ca031502d0a469203fb36255c0e572289
diff --git a/dev-ruby/metasploit-credential/metadata.xml b/dev-ruby/metasploit-credential/metadata.xml
new file mode 100644
index 000000000..98a26fb70
--- /dev/null
+++ b/dev-ruby/metasploit-credential/metadata.xml
@@ -0,0 +1,11 @@
+
+
+
+
+ zerochaos@gentoo.org
+ Rick Farina
+
+
+ rapid7/metasploit-credential
+
+
diff --git a/dev-ruby/metasploit-credential/metasploit-credential-4.0.2.ebuild b/dev-ruby/metasploit-credential/metasploit-credential-4.0.2.ebuild
new file mode 100644
index 000000000..ff20b3bd5
--- /dev/null
+++ b/dev-ruby/metasploit-credential/metasploit-credential-4.0.2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+USE_RUBY="ruby25 ruby26"
+
+RUBY_FAKEGEM_RECIPE_DOC="rdoc"
+
+inherit ruby-fakegem
+
+RUBY_FAKEGEM_EXTRAINSTALL="app config db spec"
+
+DESCRIPTION="Code for modeling and managing credentials in Metasploit"
+HOMEPAGE="https://github.com/rapid7/metasploit-credential"
+
+LICENSE="BSD"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+RESTRICT=test
+
+ruby_add_rdepend "dev-ruby/metasploit-concern:3.0
+ <=dev-ruby/metasploit_data_models-3.0.0:*
+ >=dev-ruby/metasploit-model-1.0.0
+ dev-ruby/net-ssh
+ dev-ruby/pg:*
+ >=dev-ruby/railties-5.2.2:5.2
+ dev-ruby/rex-socket
+ dev-ruby/rubyntlm
+ dev-ruby/rubyzip:*"
diff --git a/dev-ruby/metasploit-model/Manifest b/dev-ruby/metasploit-model/Manifest
new file mode 100644
index 000000000..143702362
--- /dev/null
+++ b/dev-ruby/metasploit-model/Manifest
@@ -0,0 +1 @@
+DIST metasploit-model-3.0.0.gem 81408 BLAKE2B f70b041563636d2777e2e2c11667330a24617a6f1dd0edde3ee61f947c11fcd5a89bb0ed1e02578a676a8d4dfed5b767b9d6e3048f46b7569aed52f0359a4571 SHA512 e2d373f4639a94f3f44fd3e53f21622ed19a3f086bb97e273a05224101ba40d3eec287edb69189b32a68729b8f81d385807739933e903d842f74dd82e3015964
diff --git a/dev-ruby/metasploit-model/metadata.xml b/dev-ruby/metasploit-model/metadata.xml
new file mode 100644
index 000000000..3534a5dd3
--- /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-3.0.0.ebuild b/dev-ruby/metasploit-model/metasploit-model-3.0.0.ebuild
new file mode 100644
index 000000000..d5a85cdff
--- /dev/null
+++ b/dev-ruby/metasploit-model/metasploit-model-3.0.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+USE_RUBY="ruby25 ruby26"
+
+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="https://rubygems.org/gems/${P}.gem"
+
+LICENSE="BSD"
+SLOT="$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~arm ~x86"
+#IUSE="development test"
+RESTRICT=test
+IUSE=""
+
+RDEPEND="${RDEPEND} !dev-ruby/metasploit-model:0"
+
+ruby_add_rdepend ">=dev-ruby/railties-5.2.2:5.2
+ >=dev-ruby/activesupport-5.2.2:5.2
+ >=dev-ruby/activemodel-5.2.2:5.2"
+ruby_add_bdepend "dev-ruby/bundler"
+
+all_ruby_prepare() {
+ #TODO FIXME
+ # define ENGINE_ROOT ENGINE_PATH vars instead
+ rm -r bin
+
+ [ -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
+ sed -i -e "/spec.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-payloads/Manifest b/dev-ruby/metasploit-payloads/Manifest
new file mode 100644
index 000000000..0b1e6ce82
--- /dev/null
+++ b/dev-ruby/metasploit-payloads/Manifest
@@ -0,0 +1 @@
+DIST metasploit-payloads-2.0.12.gem 12241920 BLAKE2B 5ca5acfbfe60aafe6c043b7946c4c7a2d75475326c797b3984ffc78310d6df226b21b0db9d5760bdd833508b3df362ebbd70fd73d9c458176ced0a085b4c916b SHA512 d4817806d6843207d05f888832d6f6d555816d29e5fe4edfac4b7395958962860ab004d7431fdb2f5501d1f71e4f8504fdb231a1afc655f05964a5caa6732d01
diff --git a/dev-ruby/metasploit-payloads/metadata.xml b/dev-ruby/metasploit-payloads/metadata.xml
new file mode 100644
index 000000000..a08ccf4f3
--- /dev/null
+++ b/dev-ruby/metasploit-payloads/metadata.xml
@@ -0,0 +1,12 @@
+
+
+
+
+ zerochaos@gentoo.org
+ Rick Farina
+
+
+ rapid7/metasploit-payloads
+ metasploit-payloads
+
+
diff --git a/dev-ruby/metasploit-payloads/metasploit-payloads-2.0.12.ebuild b/dev-ruby/metasploit-payloads/metasploit-payloads-2.0.12.ebuild
new file mode 100644
index 000000000..4a672895e
--- /dev/null
+++ b/dev-ruby/metasploit-payloads/metasploit-payloads-2.0.12.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+USE_RUBY="ruby25 ruby26"
+
+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 strip"
+
+QA_PREBUILT="
+ usr/lib*/ruby/gems/*/gems/${PN}-${SLOT}/data/meterpreter/msflinker_linux_x86.bin
+ usr/lib*/ruby/gems/*/gems/${PN}-${SLOT}/data/meterpreter/ext_server_sniffer.lso
+ usr/lib*/ruby/gems/*/gems/${PN}-${SLOT}/data/meterpreter/ext_server_networkpug.lso
+ usr/lib*/ruby/gems/*/gems/${PN}-${SLOT}/data/meterpreter/ext_server_stdapi.lso
+ usr/lib*/ruby/gems/*/gems/${PN}-${SLOT}/data/android/libs/armeabi/libndkstager.so
+ usr/lib*/ruby/gems/*/gems/${PN}-${SLOT}/data/android/libs/mips/libndkstager.so
+ usr/lib*/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} || die
+ #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
new file mode 100644
index 000000000..5cdeb4b2c
--- /dev/null
+++ b/dev-ruby/metasploit_data_models/Manifest
@@ -0,0 +1 @@
+DIST metasploit_data_models-4.0.2.gem 183808 BLAKE2B f61837e5003d9c244273040b246149e834b80382b76e3fe3f688eacd94ad281c670637a014a4787ecb44a86587a2fa27f38653a71524376e1cebaa2984eda827 SHA512 b9bea47e2493e7124277dfcfbc5b9de60a912c96f0bdb51a434f91b0a9869cd8cebc0d9f43fe9c343d66113e56de23f381c3c951c0d78a35f981afb319d5d6c9
diff --git a/dev-ruby/metasploit_data_models/metadata.xml b/dev-ruby/metasploit_data_models/metadata.xml
new file mode 100644
index 000000000..50c640c05
--- /dev/null
+++ b/dev-ruby/metasploit_data_models/metadata.xml
@@ -0,0 +1,11 @@
+
+
+
+
+ zerochaos@gentoo.org
+ Rick Farina
+
+
+ rapid7/metasploit_data_models
+
+
diff --git a/dev-ruby/metasploit_data_models/metasploit_data_models-4.0.2.ebuild b/dev-ruby/metasploit_data_models/metasploit_data_models-4.0.2.ebuild
new file mode 100644
index 000000000..05e7d1ebe
--- /dev/null
+++ b/dev-ruby/metasploit_data_models/metasploit_data_models-4.0.2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+USE_RUBY="ruby25 ruby26"
+
+inherit ruby-fakegem
+
+RUBY_FAKEGEM_EXTRAINSTALL="app config db script spec"
+RUBY_FAKEGEM_GEMSPEC="${PN}".gemspec
+DESCRIPTION="The database layer for Metasploit"
+HOMEPAGE="https://github.com/rapid7/metasploit_data_models"
+SRC_URI="https://rubygems.org/gems/${P}.gem"
+
+LICENSE="BSD"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~arm ~x86"
+RESTRICT=test
+#IUSE="development test"
+IUSE=""
+
+RDEPEND="${RDEPEND} !dev-ruby/metasploit_data_models:0"
+
+ruby_add_rdepend "
+ >=dev-ruby/activerecord-5.2.2:5.2[postgres]
+ >=dev-ruby/activesupport-5.2.2:5.2
+ dev-ruby/arel-helpers
+ >=dev-ruby/metasploit-concern-2.0.0
+ >=dev-ruby/metasploit-model-2.0.0
+ dev-ruby/pg:*
+ >=dev-ruby/railties-5.2.2:5.2
+ >=dev-ruby/recog-2.0.0:*"
+
+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
+ #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
+ #use the stable version of pg
+ sed -i "s/'pg', \"0.20.0\"/'pg', '0.21.0'/" metasploit_data_models.gemspec || 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
+}
+
+all_ruby_install() {
+ ruby_fakegem_binwrapper mdm_console mdm_console-${SLOT}
+}
diff --git a/dev-ruby/metasploit_payloads-mettle/Manifest b/dev-ruby/metasploit_payloads-mettle/Manifest
new file mode 100644
index 000000000..89e411b60
--- /dev/null
+++ b/dev-ruby/metasploit_payloads-mettle/Manifest
@@ -0,0 +1,2 @@
+DIST metasploit_payloads-mettle-1.0.2.gem 22206464 BLAKE2B 2c9c16436e5e6620284cc4544d794f0d99f317fa501b245df2ba3a8c999c53624a1e150e4a1b2f525468b7c0a02557ee23d7576697c699851c8e047b71d08461 SHA512 9f1f841f3ae2bb7b6576b5eb99ab0c79c3a600169b210a7782b7cf4175af31da922bf6ac7e0d8a513ae0ebc95279997696ccf42cb5df9d90d9b33d433a6722d5
+DIST metasploit_payloads-mettle-1.0.3.gem 22211072 BLAKE2B 961039f96eafd4ddfeae2b3ff8ebfa6e5d5e9933ae0b877cd097ecf89fba4f87adfe2c28d53e30b9c3f620d28bdd99fdd71dd82dc270a902fdd5148d65c78d92 SHA512 8c18dcf7264f9b574970dcd023062e7d84e14e42ae9930be36927ee06630a37b5c1e90ff722832a5b77883e86daea80e6bf8d2f466375bb790a3c4f3c4b83243
diff --git a/dev-ruby/metasploit_payloads-mettle/metadata.xml b/dev-ruby/metasploit_payloads-mettle/metadata.xml
new file mode 100644
index 000000000..af9237fca
--- /dev/null
+++ b/dev-ruby/metasploit_payloads-mettle/metadata.xml
@@ -0,0 +1,12 @@
+
+
+
+
+ zerochaos@gentoo.org
+ Rick Farina
+
+
+ rapid7/mettle
+ metasploit_payloads-mettle
+
+
diff --git a/dev-ruby/metasploit_payloads-mettle/metasploit_payloads-mettle-1.0.2.ebuild b/dev-ruby/metasploit_payloads-mettle/metasploit_payloads-mettle-1.0.2.ebuild
new file mode 100644
index 000000000..6422730b9
--- /dev/null
+++ b/dev-ruby/metasploit_payloads-mettle/metasploit_payloads-mettle-1.0.2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+USE_RUBY="ruby25 ruby26"
+
+RUBY_FAKEGEM_TASK_DOC=""
+
+RUBY_FAKEGEM_EXTRAINSTALL="build"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Compiled binaries for Metasploit's next-gen Meterpreter"
+HOMEPAGE="https://rubygems.org/gems/metasploit_payloads-mettle"
+
+LICENSE="BSD"
+
+SLOT="${PV}"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+#no tests
+RESTRICT="test strip"
+
+QA_PREBUILT="
+ usr/lib*/ruby/gems/*/gems/${P}/build/aarch64-linux-musl/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/aarch64-linux-musl/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/armv5b-linux-musleabi/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/armv5b-linux-musleabi/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/armv5l-linux-musleabi/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/armv5l-linux-musleabi/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/i486-linux-musl/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/i486-linux-musl/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips64-linux-muslsf/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips64-linux-muslsf/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips64-linux-muslsf/bin/sniffer
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips64-linux-muslsf/bin/sniffer.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mipsel-linux-muslsf/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/mipsel-linux-muslsf/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mipsel-linux-muslsf/bin/sniffer
+ usr/lib*/ruby/gems/*/gems/${P}/build/mipsel-linux-muslsf/bin/sniffer.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips-linux-muslsf/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips-linux-muslsf/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips-linux-muslsf/bin/sniffer
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips-linux-muslsf/bin/sniffer.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/powerpc64le-linux-musl/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/powerpc64le-linux-musl/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/powerpc-linux-muslsf/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/powerpc-linux-muslsf/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/s390x-linux-musl/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/s390x-linux-musl/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/x86_64-linux-musl/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/x86_64-linux-musl/bin/mettle.bin
+ "
+
+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} || die
+ #These dirs contain prebuilt binaries for running on the TARGET not the HOST
+ SEARCH_DIRS_MASK="/usr/lib*/ruby/gems/*/gems/${P}/build"
+ EOF
+}
diff --git a/dev-ruby/metasploit_payloads-mettle/metasploit_payloads-mettle-1.0.3.ebuild b/dev-ruby/metasploit_payloads-mettle/metasploit_payloads-mettle-1.0.3.ebuild
new file mode 100644
index 000000000..6422730b9
--- /dev/null
+++ b/dev-ruby/metasploit_payloads-mettle/metasploit_payloads-mettle-1.0.3.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+USE_RUBY="ruby25 ruby26"
+
+RUBY_FAKEGEM_TASK_DOC=""
+
+RUBY_FAKEGEM_EXTRAINSTALL="build"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Compiled binaries for Metasploit's next-gen Meterpreter"
+HOMEPAGE="https://rubygems.org/gems/metasploit_payloads-mettle"
+
+LICENSE="BSD"
+
+SLOT="${PV}"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+#no tests
+RESTRICT="test strip"
+
+QA_PREBUILT="
+ usr/lib*/ruby/gems/*/gems/${P}/build/aarch64-linux-musl/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/aarch64-linux-musl/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/armv5b-linux-musleabi/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/armv5b-linux-musleabi/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/armv5l-linux-musleabi/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/armv5l-linux-musleabi/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/i486-linux-musl/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/i486-linux-musl/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips64-linux-muslsf/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips64-linux-muslsf/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips64-linux-muslsf/bin/sniffer
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips64-linux-muslsf/bin/sniffer.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mipsel-linux-muslsf/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/mipsel-linux-muslsf/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mipsel-linux-muslsf/bin/sniffer
+ usr/lib*/ruby/gems/*/gems/${P}/build/mipsel-linux-muslsf/bin/sniffer.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips-linux-muslsf/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips-linux-muslsf/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips-linux-muslsf/bin/sniffer
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips-linux-muslsf/bin/sniffer.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/powerpc64le-linux-musl/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/powerpc64le-linux-musl/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/powerpc-linux-muslsf/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/powerpc-linux-muslsf/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/s390x-linux-musl/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/s390x-linux-musl/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/x86_64-linux-musl/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/x86_64-linux-musl/bin/mettle.bin
+ "
+
+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} || die
+ #These dirs contain prebuilt binaries for running on the TARGET not the HOST
+ SEARCH_DIRS_MASK="/usr/lib*/ruby/gems/*/gems/${P}/build"
+ EOF
+}
diff --git a/dev-ruby/rex-core/Manifest b/dev-ruby/rex-core/Manifest
new file mode 100644
index 000000000..56ce9e7c0
--- /dev/null
+++ b/dev-ruby/rex-core/Manifest
@@ -0,0 +1 @@
+DIST rex-core-0.1.13.gem 30208 BLAKE2B 3de93b7869e751574979160d458406cdb83f6683383b6e60e7defe7e02fd7fe02c39589983f6800d07d48527572869f685e57fa8dc3f2a0ba9fb1cf1cbf6ad84 SHA512 d7a402f732620a7ce25d3401fea9c97b4dbac8d37fc8d9183d621bfc16004e2f7171e0346b05fcb64a9c2af8b2b17e32d6ae11268a5300cc31111ab83dabfa9a
diff --git a/dev-ruby/rex-core/metadata.xml b/dev-ruby/rex-core/metadata.xml
new file mode 100644
index 000000000..ace7c2d3a
--- /dev/null
+++ b/dev-ruby/rex-core/metadata.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ unknown@pentoo.ch
+ Author Unknown
+
+
diff --git a/dev-ruby/rex-core/rex-core-0.1.13.ebuild b/dev-ruby/rex-core/rex-core-0.1.13.ebuild
new file mode 100644
index 000000000..8acc7084e
--- /dev/null
+++ b/dev-ruby/rex-core/rex-core-0.1.13.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+USE_RUBY="ruby25 ruby26 ruby27"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Core libraries required for the Ruby Exploitation (Rex) Suite"
+HOMEPAGE="https://github.com/rapid7/rex-core"
+
+LICENSE="BSD-3"
+
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+# doesn't seem to actually run any tests, fails without disabling
+RESTRICT=test
diff --git a/dev-ruby/rex-socket/Manifest b/dev-ruby/rex-socket/Manifest
new file mode 100644
index 000000000..1fa668ed8
--- /dev/null
+++ b/dev-ruby/rex-socket/Manifest
@@ -0,0 +1 @@
+DIST rex-socket-0.1.23.gem 41472 BLAKE2B e745c73ba5a5e334200ee0642ad729996e817d3189edb19a45feee36e4b8d2c9bc991a52c6be194731addd5781dccd9fd097d648bf95c7a694644bb939acf139 SHA512 69bda807a096a57cca1e580fd8cc3b5500a720f9be2daf2af64732f4b521e6ba994b9920b7110777b228909932577800d891069c3473fbfa4689744079a45578
diff --git a/dev-ruby/rex-socket/metadata.xml b/dev-ruby/rex-socket/metadata.xml
new file mode 100644
index 000000000..ace7c2d3a
--- /dev/null
+++ b/dev-ruby/rex-socket/metadata.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ unknown@pentoo.ch
+ Author Unknown
+
+
diff --git a/dev-ruby/rex-socket/rex-socket-0.1.23.ebuild b/dev-ruby/rex-socket/rex-socket-0.1.23.ebuild
new file mode 100644
index 000000000..cf185913c
--- /dev/null
+++ b/dev-ruby/rex-socket/rex-socket-0.1.23.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+USE_RUBY="ruby25 ruby26 ruby27"
+
+inherit ruby-fakegem
+
+DESCRIPTION="The Ruby Exploitation (Rex) Socket Abstraction Library"
+HOMEPAGE="https://github.com/rapid7/rex-socket"
+
+LICENSE="BSD-3"
+
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+# doesn't seem to actually run any tests, fails without disabling
+RESTRICT=test
+
+ruby_add_bdepend "dev-ruby/rex-core"
diff --git a/net-analyzer/metasploit/Manifest b/net-analyzer/metasploit/Manifest
new file mode 100644
index 000000000..2243a4f11
--- /dev/null
+++ b/net-analyzer/metasploit/Manifest
@@ -0,0 +1 @@
+DIST metasploit-6.0.6.tar.gz 65135869 BLAKE2B fdc175d342ad8f3432ec43060bcc6c610cc8e7842ede202bc013fe90cf7b4de1fc06de85618411ee53db7324a697c0723cb99215ab4fa1a3f0d82050eaba5cdc SHA512 50a10085a0e0a6e9439ce91f893939989ed00f4672549c1de0a7ad44094d675ae1e21621c09ba1799dac7a69c5e3de7aa2c6e554818cd255fe98532329ba9965
diff --git a/net-analyzer/metasploit/metasploit-6.0.6.ebuild b/net-analyzer/metasploit/metasploit-6.0.6.ebuild
new file mode 100644
index 000000000..5b0fc3a8d
--- /dev/null
+++ b/net-analyzer/metasploit/metasploit-6.0.6.ebuild
@@ -0,0 +1,351 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+#never ever ever have more than one ruby in here
+#TODO: use ruby-single instead?
+USE_RUBY="ruby25"
+inherit eutils ruby-ng
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/rapid7/metasploit-framework.git"
+ EGIT_BRANCH="4.x"
+ EGIT_CHECKOUT_DIR="${WORKDIR}"/all
+ inherit git-r3
+ SLOT="9999"
+else
+ ##Tags https://github.com/rapid7/metasploit-framework/releases
+ MY_PV=${PV/_p/-}
+ SRC_URI="https://github.com/rapid7/metasploit-framework/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+#WIP, fix deps
+# KEYWORDS="~amd64 ~arm ~x86"
+ RUBY_S="${PN}-framework-${MY_PV}"
+ SLOT="$(ver_cut 1).$(ver_cut 2)"
+fi
+
+DESCRIPTION="Advanced framework for developing, testing, and using vulnerability exploit code"
+HOMEPAGE="http://www.metasploit.org/"
+LICENSE="BSD"
+IUSE="development +java nexpose 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"
+
+#grep spec.add_runtime_dependency metasploit-framework.gemspec | sort
+RUBY_COMMON_DEPEND="virtual/ruby-ssl
+ >=dev-ruby/actionpack-5.2.2:5.2
+ >=dev-ruby/activerecord-5.2.2:5.2
+ >=dev-ruby/activesupport-5.2.2:5.2
+ dev-ruby/backports
+ dev-ruby/bcrypt-ruby
+ dev-ruby/bcrypt_pbkdf
+ dev-ruby/bit-struct
+ dev-ruby/bundler:*
+ dev-ruby/dnsruby
+ dev-ruby/faker:0
+ dev-ruby/faraday
+ dev-ruby/filesize:*
+ dev-ruby/jsobfu:*
+ dev-ruby/json:*
+ dev-ruby/metasm:*
+ dev-ruby/metasploit-concern
+ dev-ruby/metasploit-credential
+ dev-ruby/metasploit_data_models
+ dev-ruby/metasploit-model
+ dev-ruby/metasploit-payloads:2.0.12
+ dev-ruby/metasploit_payloads-mettle:1.0.2
+ dev-ruby/mqtt
+ dev-ruby/msgpack
+ dev-ruby/net-ssh:*
+ dev-ruby/ed25519
+ dev-ruby/nokogiri
+ dev-ruby/octokit
+ =dev-ruby/openssl-ccm-1.2*
+ dev-ruby/packetfu:1.1.13
+ dev-ruby/patch_finder
+ dev-ruby/pdf-reader:*
+ ~dev-ruby/pg-0.21.0
+ dev-ruby/railties:*
+ dev-ruby/rb-readline
+ dev-ruby/recog:*
+ dev-ruby/redcarpet
+ dev-ruby/rex-arch
+ dev-ruby/rex-bin_tools
+ dev-ruby/rex-core
+ dev-ruby/rex-encoder
+ dev-ruby/rex-exploitation
+ dev-ruby/rex-java
+ dev-ruby/rex-mime
+ dev-ruby/rex-nop
+ dev-ruby/rex-ole
+ dev-ruby/rex-powershell
+ dev-ruby/rex-random_identifier
+ dev-ruby/rex-registry
+ dev-ruby/rex-rop_builder
+ dev-ruby/rex-socket
+ dev-ruby/rex-sslscan
+ dev-ruby/rex-struct2
+ dev-ruby/rex-text
+ dev-ruby/rex-zip
+ dev-ruby/ruby-macho
+ dev-ruby/rubyntlm
+ dev-ruby/ruby_smb:*
+ dev-ruby/rubyzip:*
+ dev-ruby/sqlite3
+ dev-ruby/sshkey
+ dev-ruby/tzinfo:*
+ dev-ruby/windows_error
+ dev-ruby/xdr:2.0.0
+ dev-ruby/xmlrpc
+ java? ( dev-ruby/rjb )
+ nexpose? ( dev-ruby/nexpose )
+ 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
+ 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-jumbo >=app-crypt/johntheripper-1.7.9-r1[-minimal(-)] )
+ net-analyzer/nmap"
+RDEPEND+=" ${COMMON_DEPEND}
+ >=app-eselect/eselect-metasploit-0.16"
+
+RESTRICT="strip"
+
+QA_PREBUILT="
+ usr/lib*/${PN}${SLOT}/data/templates/template_x86_linux.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_armle_linux.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_x86_solaris.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_x64_linux.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_x64_linux_dll.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_x86_bsd.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_x64_bsd.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_mipsbe_linux.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_mipsle_linux.bin
+ usr/lib*/${PN}${SLOT}/data/meterpreter/msflinker_linux_x86.bin
+ usr/lib*/${PN}${SLOT}/data/meterpreter/ext_server_sniffer.lso
+ usr/lib*/${PN}${SLOT}/data/meterpreter/ext_server_networkpug.lso
+ usr/lib*/${PN}${SLOT}/data/meterpreter/ext_server_stdapi.lso
+ usr/lib*/${PN}${SLOT}/data/exploits/CVE-2013-2171.bin
+ usr/lib*/${PN}${SLOT}/data/exploits/CVE-2014-3153.elf
+ usr/lib*/${PN}${SLOT}/data/exploits/mysql/lib_mysqludf_sys_32.so
+ usr/lib*/${PN}${SLOT}/data/exploits/*
+ usr/lib*/${PN}${SLOT}/data/android/libs/x86/libndkstager.so
+ usr/lib*/${PN}${SLOT}/data/android/libs/mips/libndkstager.so
+ usr/lib*/${PN}${SLOT}/data/android/libs/armeabi/libndkstager.so
+ usr/lib*/${PN}${SLOT}/data/templates/template_x86_linux_dll.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_armle_linux_dll.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_aarch64_linux.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
+ #msf_version=$(grep --color=never "CURRENT_VERSION =" ${S}/spec/lib/msf/core/framework_spec.rb)
+ #msf_version=${msf_version#*=}
+ 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"
+ eapply_user
+
+ #remove random "cpuinfo" binaries which a only needed to detect which bundled john to run
+ rm -r data/cpuinfo
+
+ #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
+ sed -i "/gem 'fivemat'/s/, '1.2.1'//" Gemfile || die
+ #use released packetfu
+ sed -i "s/1.1.13.pre/1.1.13/" metasploit-framework.gemspec || die
+ #use the stable pg
+ #https://github.com/rapid7/metasploit-framework/issues/10234
+ sed -i "s/dependency 'pg', '0.20.0'/dependency 'pg', '0.21.0'/" metasploit-framework.gemspec || die
+ #git gems are only for ruby24 support and we are not there yet
+ sed -i "/git:/d" Gemfile || die
+
+ #now we edit the Gemfile based on use flags
+ if ! use pcap; then
+ sed -i -e "/^group :pcap do/,/^end$/d" Gemfile || die
+ fi
+ if ! use nexpose; then
+ sed -i -e "/nexpose/d" metasploit-framework.gemspec || die
+ fi
+ #no support for nessus right now
+ #if ! use nessus; then
+ sed -i -e "/nessus/d" metasploit-framework.gemspec || die
+ #fi
+ #this version is old, remove it
+ sed -i -e "/openvas-omp/d" metasploit-framework.gemspec || die
+ #even if we pass --without=blah bundler still calculates the deps and messes us up
+ 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
+ #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
+
+ #https://bugs.gentoo.org/show_bug.cgi?id=584522 no tzinfo-data by choice in gentoo
+ sed -i '/tzinfo-data/d' metasploit-framework.gemspec
+
+ #fails without faraday in Gemfile.lock
+ #despite activesupport(?) needing it, it doesn't end up there :-(
+ sed -i "/'activesupport'/a \ \ spec.add_runtime_dependency 'faraday'" metasploit-framework.gemspec
+
+ #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 "if [ -x /usr/bin/smart-live-rebuild ]; then" >> msfupdate
+ echo " smart-live-rebuild -f net-analyzer/metasploit" >> msfupdate
+ echo "else" >> msfupdate
+ echo " echo \"Please install app-portage/smart-live-rebuild for a better experience.\"" >> msfupdate
+ echo "emerge --oneshot \"=${CATEGORY}/${PF}\"" >> msfupdate
+ echo "fi" >> 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() {
+ 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 use desired ruby version
+ #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
+ BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle exec rake db:create || die
+ BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle exec rake db:migrate || die
+
+ MSF_DATABASE_CONFIG=config/database.yml BUNDLE_GEMFILE=Gemfile ${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/lib/${PN}${SLOT}
+ cp -R * "${ED}"/usr/lib/${PN}${SLOT} || die "Copy files failed"
+ rm -Rf "${ED}"/usr/lib/${PN}${SLOT}/documentation "${ED}"/usr/lib${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
+ ln -s "../../share/doc/${PF}/documentation" "${ED}/usr/lib/${PN}${SLOT}/documentation"
+
+ fperms +x /usr/lib/${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"
+ 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"
+}
diff --git a/profiles/pentoo/base/package.accept_keywords/dev-ruby b/profiles/pentoo/base/package.accept_keywords/dev-ruby
index e003528de..dc72a2c11 100644
--- a/profiles/pentoo/base/package.accept_keywords/dev-ruby
+++ b/profiles/pentoo/base/package.accept_keywords/dev-ruby
@@ -48,6 +48,8 @@ dev-ruby/windows_error
~dev-ruby/pg-0.20.0
~dev-ruby/regexp_parser-0.4.3
dev-ruby/metasploit_payloads-mettle
+dev-ruby/rex-core
+dev-ruby/rex-socket
dev-ruby/rex-ole
dev-ruby/rex-arch
dev-ruby/rex-struct2
@@ -64,7 +66,7 @@ dev-ruby/bit-struct
=dev-ruby/rake-10.5*
dev-ruby/rkelly-remix
~dev-ruby/filesize-0.2.0
-dev-ruby/metasm:1.0.2
+=dev-ruby/metasm-1.0*
dev-ruby/rb-readline-r7
~dev-ruby/yard-0.8.7.6
~dev-ruby/abstract-1.0.0
@@ -86,8 +88,8 @@ dev-ruby/pg_array_parser
dev-ruby/metasploit-concern
dev-ruby/metasploit-credential
dev-ruby/metasploit-model
-~dev-ruby/metasploit-payloads-1.3.53
-~dev-ruby/metasploit_data_models-0.4.2
+dev-ruby/metasploit-payloads
+dev-ruby/metasploit_data_models
dev-ruby/meterpreter_bins
dev-ruby/openssl-ccm:1.2.1
=dev-ruby/sawyer-0.8*
diff --git a/profiles/pentoo/base/package.accept_keywords/net-analyzer b/profiles/pentoo/base/package.accept_keywords/net-analyzer
index 2e3dcb151..dcc4e072e 100644
--- a/profiles/pentoo/base/package.accept_keywords/net-analyzer
+++ b/profiles/pentoo/base/package.accept_keywords/net-analyzer
@@ -76,6 +76,7 @@ net-analyzer/packit
=net-analyzer/plecost-9999
=net-analyzer/wafp-9999
=net-analyzer/metasploit-9999 **
+=net-analyzer/metasploit-6*
net-analyzer/multimon-ng
~net-analyzer/aimsniff-0.9d
~net-analyzer/arpantispoofer-1.0.1.32