diff --git a/dev-ruby/metasploit-payloads/Manifest b/dev-ruby/metasploit-payloads/Manifest
index 1d64d7a75..0a28b400c 100644
--- a/dev-ruby/metasploit-payloads/Manifest
+++ b/dev-ruby/metasploit-payloads/Manifest
@@ -1,5 +1,4 @@
-DIST metasploit-payloads-1.3.25.gem 11934720 BLAKE2B 0d11e013e88a5e334727d798bf3374139a92348d06d426f889398ea58f06630458402b26a237aa0c98977faf7e2b292a47380f70dea4a259060c17d112ae9039 SHA512 d176229c38172c0c5949f63b84501d3f2dca19f1bd0cc799eb964e5a508be6dd903f2b3a3328ede2e6b915399adf8b6b4fb6961c88152f0d7f0f19749caf4e1a
-DIST metasploit-payloads-1.3.31.gem 11935232 BLAKE2B a454b03da76d847f85edccd3845adc67608e40c60797665d82ba0c0be985b88b1b032836f0a14fb00abde2ca7f75b73d6e1d39165e57887e54cbb86995039f19 SHA512 062efd0b3e80009f03344bb6c2907ca452650bc581cafacbedbfda6717038dce6a0cc2a9ddbac2ff3bda993935005b1b49f4b7653f08230434295137f48e4c1e
DIST metasploit-payloads-1.3.34.gem 11936256 BLAKE2B 386494ebca9c1ee6eda6460057a424f4157059e1600b06d0d46fff5a5503d56bf3e65e48d11b2e78ab524e348f2ac0cbad508e8006103521ed8799cb201a96d3 SHA512 588ed58f98b221f87a756e4d10b39b293b12bf8894b742ec26534f92cdcdcae56897de821e13bfd48083f794f0da41678bd2ffd441c97f5654e389b864287bcc
-DIST metasploit-payloads-1.3.37.gem 12016640 BLAKE2B bbf6c6cdfc0f8a8c08abe3dcad87b1fe1a97fb7882771a4a9b253b299352b1c6a8f9cbc682f42785a4db4971ca1c43c809d9922d8ff8bda5b96d4583e75d597c SHA512 87a776ef3cdf10c036de9fb7bea9baae022dabb3997449232d11fd511997e9dd3c0e84db6100d1d744b221a15fc94a6d7e09828304e2f3086d1d44fad9f04446
DIST metasploit-payloads-1.3.40.gem 12027392 BLAKE2B e0d81b5dc398043d3c523663353908d40b61c9dec9f560348e861ef418794f266ec5b92ac8823fc9a5dc5103da2e0efa646f473b1c15933eb484484db663ddba SHA512 b37a6ccb3700dbe138a1888b2c35c2b8ffc4722fa89bae841841eaf7addac18519a3f4e77de74653a6d956ddaaaf32d7f96e1c970a5323c2336a9d34abdab6f4
+DIST metasploit-payloads-1.3.42.gem 12027392 BLAKE2B 064fa57201a192e6bcb5e8607edaaa0b1b196939b84404b73c32abe4a92be47450cf92d3ff8615b5529e3beb72e3aae515b59fb2c8e611fdf460305c2df27570 SHA512 25b44f248ed90ed4beef3e7fea7f45e6dfa89ddf3160fb2ed1bbab7c2577213fd9c0153860a16b879b046cc3c8a29590cd07bf0af5bac35cdb2a5bba8da8c732
+DIST metasploit-payloads-1.3.43.gem 12035072 BLAKE2B 08a4e773d7c94e9f77cb2e783727bccbe26c405bb521634cfc5977c43f5f94c2337fe9bb8ddb625cc4286000fd2a7f15391cca55fed99810a756971389af118c SHA512 d800a3e96e8ace64e00bf046fc2d740349f56f18f02a314c5b13e250f0e271da3230321b07a743c6129e0b92022a4c7a423ef6732f527e247e8fb3b13a9d381f
diff --git a/dev-ruby/metasploit-payloads/metadata.xml b/dev-ruby/metasploit-payloads/metadata.xml
deleted file mode 100644
index fcb6a8fad..000000000
--- a/dev-ruby/metasploit-payloads/metadata.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
- zerochaos@gentoo.org
- Rick Farina
-
-
-
-
- rapid7/metasploit-payloads
- metasploit-payloads
-
-
diff --git a/dev-ruby/metasploit-payloads/metasploit-payloads-1.3.31.ebuild b/dev-ruby/metasploit-payloads/metasploit-payloads-1.3.31.ebuild
deleted file mode 100644
index b8bb0f66d..000000000
--- a/dev-ruby/metasploit-payloads/metasploit-payloads-1.3.31.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-USE_RUBY="ruby21 ruby22 ruby23 ruby24"
-
-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-payloads/metasploit-payloads-1.3.37.ebuild b/dev-ruby/metasploit-payloads/metasploit-payloads-1.3.42.ebuild
similarity index 100%
rename from dev-ruby/metasploit-payloads/metasploit-payloads-1.3.37.ebuild
rename to dev-ruby/metasploit-payloads/metasploit-payloads-1.3.42.ebuild
diff --git a/dev-ruby/metasploit-payloads/metasploit-payloads-1.3.25.ebuild b/dev-ruby/metasploit-payloads/metasploit-payloads-1.3.43.ebuild
similarity index 94%
rename from dev-ruby/metasploit-payloads/metasploit-payloads-1.3.25.ebuild
rename to dev-ruby/metasploit-payloads/metasploit-payloads-1.3.43.ebuild
index b8bb0f66d..c89ecf792 100644
--- a/dev-ruby/metasploit-payloads/metasploit-payloads-1.3.25.ebuild
+++ b/dev-ruby/metasploit-payloads/metasploit-payloads-1.3.43.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-USE_RUBY="ruby21 ruby22 ruby23 ruby24"
+USE_RUBY="ruby23 ruby24 ruby25"
RUBY_FAKEGEM_TASK_DOC=""
diff --git a/net-analyzer/bettercap/Manifest b/net-analyzer/bettercap/Manifest
index 1efc2f968..79fe61556 100644
--- a/net-analyzer/bettercap/Manifest
+++ b/net-analyzer/bettercap/Manifest
@@ -1,6 +1,7 @@
DIST bettercap-1.6.2.tar.gz 781103 BLAKE2B 08dd1a94c2967f023ed98e9b62e82d01dea8a57eff8ad0dd2588d7e6b1f12e257e195459c2c0274baeb41fbeb04c9fd0af238d3b96dca273296087f3b34d9447 SHA512 b1398cb74ae8c04ede38ef3e01ab538693e86c85316327525b2cd30df5c8c4b389bf616c2a1096836dd69209aa7fea500a08ebfae5445c64d9b5b5e1bacdf485
DIST bettercap-2.6.tar.gz 2067076 BLAKE2B 98e625598640d91b1f8e5d8abe4f12f5d16e985d9f09b341d0a1b2cf6ddb50e3fa3cd51772ecc1c2f57541f4595e2a5d351534b49290dc3fd69f18e8b6db84a6 SHA512 cf58c457fd342a33497ffedcc0a9a4b0b337ca3a9fdaaf81530142835c78376a9a3c01a5326f3d7933d3b0b4b8d128c0b2c8d8397c907d78cd250e8fb9ffaacf
DIST bettercap-2.7.tar.gz 2072828 BLAKE2B b27da4ffedabbca47fd1c64f624c8aa8f06a30d1d610e22d572c0c0b9160309508f3533fa12e91910fe480fbb376c11f14d4b50e90ede4334fdb81c8b4ab4bad SHA512 9ac9ff08d9d24fa339fcf981d70945daf51b743a05f0f30d9153bfd756bdd9cdc1ebed221d6898740dfa57fb46d1b4d22d22cf942ea9737dbc2f5fafbb04713e
+DIST bettercap-2.8.tar.gz 2075511 BLAKE2B 01d2159f2aa2133b315c99edeb9bf41c11383837a6cab29ec7472724aca7c895008a5cd3846e7106d07ef32910bd6d4fd92a82ad80ae0b0a33e55fd6500d96de SHA512 f23f42d06e938d615d3d7033cdabdeeb571c606dd24ae8a412262b34871980d7e0bb3a13d9836668f7667a9d7fac1cfb27e0bb8b5bcf94854e9353991f748325
DIST github.com-adrianmo-go-nmea-22095aa1b48050243d3eb9a001ca80eb91a0c6fa.tar.gz 14236 BLAKE2B 98716c9209b105da7062a91d89cd80bb530708d3c2422f9fbc246b594edfebc117ebb89417e60dbeb702a7c463e636fb347104e4b2392c90079f7cbbccad3b06 SHA512 c85e8680641a48a75705e602e8724a766073dfc9153d5a5f796d77ed839dbc921c2b62cb6b50b27d0068a0e4a38c36c9d89943c05766352f18e3de24a1acfaf2
DIST github.com-bettercap-gatt-6475b946a0bff32e906c25d861f2b1c6d2056baa.tar.gz 67057 BLAKE2B 2e780572589d84c20076707583fb756ab48db27170ee28e86583adefe71be26c7cb63f55d37f8d32e6705b196df17aed82eec81ee39ac00bd0010839df84819c SHA512 91fd2db5a9e7324d5e651650963a58f7a72c198d6c787221ebe3b7fad3d2be0023a366db976eba198fe7be8a000781b688f6eedf2c8ebea81f7c747039ef9a5c
DIST github.com-bettercap-gatt-66e7446993acb3de936b3f487e5933522ed16923.tar.gz 67087 BLAKE2B 28cd9ce3fa9bb1cda7d91d0bd0b263e03dd93997638a39395ead0656a44c965eba60fe8fe828fef374a576e9c99e353dd6cd0b184b7fafbf61821a0440a887dd SHA512 b54cc90904dda8d88fdaa8f2618e62da2d7c24c8e280875decc052d17a07e29fa282238f729956619762cf142b426228ebc75076ca6f5b3e9151d55b0bad08f8
diff --git a/net-analyzer/bettercap/bettercap-2.8.ebuild b/net-analyzer/bettercap/bettercap-2.8.ebuild
new file mode 100644
index 000000000..62216fa06
--- /dev/null
+++ b/net-analyzer/bettercap/bettercap-2.8.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGO_VENDOR=(
+ "github.com/adrianmo/go-nmea 22095aa1b48050243d3eb9a001ca80eb91a0c6fa"
+ "github.com/bettercap/gatt 66e7446993acb3de936b3f487e5933522ed16923"
+ "github.com/bettercap/readline 62c6fe6193755f722b8b8788aa7357be55a50ff1"
+ "github.com/chifflier/nfqueue-go 61ca646babef3bd4dea1deb610bfb0005c0a1298"
+ "github.com/dustin/go-humanize 02af3965c54e8cacf948b97fef38925c4120652c"
+ "github.com/elazarl/goproxy a96fa3a318260eab29abaf32f7128c9eb07fb073"
+ "github.com/gobwas/glob f00a7392b43971b2fdb562418faab1f18da2067a"
+ "github.com/google/go-github e48060a28fac52d0f1cb758bc8b87c07bac4a87d"
+ "github.com/google/go-querystring 53e6ce116135b80d037921a7fdd5138cf32d7a8a"
+ "github.com/gorilla/context 1ea25387ff6f684839d82767c1733ff4d4d15d0a"
+ "github.com/inconshreveable/go-vhost 06d84117953b22058c096b49a429ebd4f3d3d97b"
+ "github.com/jpillora/go-tld a31ae10e978ab5f352c5dad2cfbd60546dcea75f"
+ "github.com/malfunkt/iprange 3a31f5ed42d2d8a1fc46f1be91fd693bdef2dd52"
+ "github.com/mattn/go-colorable 167de6bfdfba052fa6b2d3664c8f5272e23c9072"
+ "github.com/mdlayher/dhcp6 e26af0688e455a82b14ebdbecf43f87ead3c4624"
+ "github.com/mgutz/ansi 9520e82c474b0a04dd04f8a40959027271bab992"
+ "github.com/mgutz/logxi aebf8a7d67ab4625e0fd4a665766fef9a709161b"
+ "github.com/pkg/errors 645ef00459ed84a119197bfb8d8205042c6df63d"
+ "github.com/robertkrimen/otto 03d472dc43abece8691e609a23d295ab732abba6"
+ "github.com/tarm/serial eaafced92e9619f03c72527efeab21e326f3bc36"
+ "golang.org/x/sys d0faeb539838e250bd0a9db4182d48d4a1915181 github.com/golang/sys"
+ "gopkg.in/sourcemap.v1 6e83acea0053641eff084973fee085f0c193c61a github.com/go-sourcemap/sourcemap"
+)
+
+#see DEPEND
+# "github.com/google/gopacket 11c65f1ca9081dfea43b4f9643f5c155583b73ba"
+# "github.com/mattn/go-isatty 0360b2af4f38e8d38c7fce2a9f4e702702d73a39"
+# "github.com/gorilla/mux 53c1911da2b537f792e7cafcb446b05ffe33b996"
+# "github.com/gorilla/websocket ea4d1f681babbce9545c9c5f3d5194a789c89f5b"
+
+EGO_PN=github.com/bettercap/bettercap
+
+inherit golang-build golang-vcs-snapshot
+
+EGIT_COMMIT="v${PV}"
+ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz ${EGO_VENDOR_URI}"
+SRC_URI="${ARCHIVE_URI} ${EGO_VENDOR_URI}"
+
+DESCRIPTION="A complete, modular, portable and easily extensible MITM framework"
+HOMEPAGE="https://github.com/bettercap/bettercap/"
+LICENSE="GPL-3"
+SLOT=0
+IUSE=""
+KEYWORDS="~amd64 ~arm ~arm64"
+
+#FIXME: add stable versions, see Gopkg.lock, "version"
+DEPEND="dev-go/go-isatty
+ dev-go/gopacket
+ dev-go/mux
+ dev-go/websocket
+ "
+
+RDEPEND="net-libs/libpcap
+ net-libs/libnetfilter_queue"
+
+src_install(){
+ dosbin bettercap
+}
diff --git a/net-analyzer/metasploit/Manifest b/net-analyzer/metasploit/Manifest
index 96dd99cf1..d8a887d6b 100644
--- a/net-analyzer/metasploit/Manifest
+++ b/net-analyzer/metasploit/Manifest
@@ -1,3 +1,2 @@
-DIST metasploit-4.16.56.tar.gz 25971575 BLAKE2B d2c3e7c9fc65060677c762fe7bd2aa1c606f12517085a7bf8be5629932795594025fe3dff40421ad8151ab609f6eb77a153fb48b713b11b0af89a955397ebf34 SHA512 fd8740d3c28b8e1a9279226c25ea1bffaa6b6070f63c46c27f4fad6aba0922b77b995eae27c92b2543d3a19aa00a6fc061e02f264fb92fa2afddc015e63589ee
-DIST metasploit-4.16.64.tar.gz 26653776 BLAKE2B aa110e24f0ae11ddf75aeb13e9b6674609778f5779a4d925b2f35362edb5d65bd552883ba13880aa5c1a9278d5135db7013f1b953a039a2c904f2394c33937b3 SHA512 fea8c3836eff9ba00449c1337b60b5e9619a93e6c79443074e5e196e991c3f24f498f7d5faa87ad95be26185038a85782c04d189c4d822e0a64b0699f086692e
DIST metasploit-4.17.1.tar.gz 26681592 BLAKE2B 1f69cbf005bc5c504679181cab5e7791ff72505789bef3a3a2fd45174e6aca97393c27e6e4c8f61e689e3716ea0215b4b31fbd0255e994e6a4a011b5c6ad0744 SHA512 84133240901a11a80b15092a994743628816de0edf28089c42125b6a7b40fea598eedd7e10e08ca2b1ec711506be0ffe85f43ae9f092d1a1fda2b4772aba4916
+DIST metasploit-4.17.7.tar.gz 26973043 BLAKE2B f8f90e54a5647e803f361c321c910e84988d67cb67a72d9c183df20708702329ff6fab01bb347dddc4c2667783c0ea1313d81f20b64bf0740c3cfc540eba6dd0 SHA512 3c1ebd9098cad61e6e5ee731347aedffbbaa1085f2a025193e69d0a9116f8687e25ed629a6f9c8d6d699bd1aae6a83e494d3842db05f503da5a00ba700123f0f
diff --git a/net-analyzer/metasploit/metasploit-4.16.56.ebuild b/net-analyzer/metasploit/metasploit-4.16.56.ebuild
deleted file mode 100644
index 82c83c6dd..000000000
--- a/net-analyzer/metasploit/metasploit-4.16.56.ebuild
+++ /dev/null
@@ -1,348 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-#never ever ever have more than one ruby in here
-USE_RUBY="ruby23"
-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
- ##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"
- KEYWORDS="~amd64 ~x86"
- RUBY_S="${PN}-framework-${MY_PV}"
- inherit versionator
- SLOT="$(get_version_component_range 1).$(get_version_component_range 2)"
-fi
-
-DESCRIPTION="Advanced framework for developing, testing, and using vulnerability exploit code"
-HOMEPAGE="http://www.metasploit.org/"
-LICENSE="BSD"
-IUSE="development +java nexpose openvas 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-4.2.6:4.2
- >=dev-ruby/actionpack-4.2.6:4.2
- >=dev-ruby/activerecord-4.2.6:4.2
- dev-ruby/backports
- dev-ruby/bcrypt-ruby
- dev-ruby/bcrypt_pbkdf
- dev-ruby/bit-struct
- >=dev-ruby/builder-3.0
- dev-ruby/bundler
- dev-ruby/dnsruby
- dev-ruby/filesize
- >=dev-ruby/jsobfu-0.3.0
- dev-ruby/json:*
- dev-ruby/kissfft
- dev-ruby/metasm:1.0.2
- dev-ruby/mqtt
- >=dev-ruby/metasploit_data_models-2.0.0
- dev-ruby/meterpreter_bins:0.0.22
- dev-ruby/metasploit-payloads:1.3.34
- dev-ruby/metasploit_payloads-mettle:0.3.8
- >=dev-ruby/metasploit-credential-2.0.0
- >=dev-ruby/metasploit-concern-2.0.0
- >=dev-ruby/metasploit-model-2.0.0
- dev-ruby/msgpack
- dev-ruby/net-ssh:*
- dev-ruby/nokogiri
- dev-ruby/octokit
- dev-ruby/openssl-ccm:1.2.1
- dev-ruby/patch_finder
- dev-ruby/pdf-reader
- dev-ruby/rbnacl:4
- dev-ruby/rbnacl-libsodium
- >=dev-ruby/recog-2.0.14
- dev-ruby/redcarpet
- >=dev-ruby/rkelly-remix-0.0.6
- >=dev-ruby/rex-arch-0.1.13
- 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-socket-0.1.10
- dev-ruby/rex-sslscan
- dev-ruby/rex-rop_builder
- dev-ruby/rex-struct2
- dev-ruby/rex-text
- dev-ruby/rex-zip
- =dev-ruby/ruby_smb-0.0.18
- dev-ruby/ruby-macho
- dev-ruby/sqlite3
- =dev-ruby/pg-0.20.0
- dev-ruby/packetfu:1.1.13
- >=dev-ruby/rubyzip-1.1
- >=dev-ruby/ruby_smb-0.0.18
- >=dev-ruby/rb-readline-0.5.4
- dev-ruby/robots
- dev-ruby/sshkey
- dev-ruby/tzinfo:*
- dev-ruby/windows_error
- dev-ruby/xmlrpc
- dev-ruby/xdr
- dev-ruby/mqtt
- dev-ruby/faker
- java? ( dev-ruby/rjb )
- nexpose? ( dev-ruby/nexpose )
- openvas? ( dev-ruby/openvas-omp )
- 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-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/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
- #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
- if ! use openvas; then
- sed -i -e "/openvas-omp/d" metasploit-framework.gemspec || die
- fi
- #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
-
- #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/$(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"
- 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/net-analyzer/metasploit/metasploit-4.16.64.ebuild b/net-analyzer/metasploit/metasploit-4.17.7.ebuild
similarity index 99%
rename from net-analyzer/metasploit/metasploit-4.16.64.ebuild
rename to net-analyzer/metasploit/metasploit-4.17.7.ebuild
index a68c3e84a..e305690ed 100644
--- a/net-analyzer/metasploit/metasploit-4.16.64.ebuild
+++ b/net-analyzer/metasploit/metasploit-4.17.7.ebuild
@@ -52,7 +52,7 @@ RUBY_COMMON_DEPEND="virtual/ruby-ssl