diff options
-rw-r--r-- | dev-ruby/metasploit-credential/Manifest | 1 | ||||
-rw-r--r-- | dev-ruby/metasploit-credential/metasploit-credential-2.0.3.ebuild | 28 | ||||
-rw-r--r-- | dev-ruby/metasploit-model/Manifest | 1 | ||||
-rw-r--r-- | dev-ruby/metasploit-model/metasploit-model-2.0.0.ebuild | 72 | ||||
-rw-r--r-- | dev-ruby/metasploit_data_models/Manifest | 1 | ||||
-rw-r--r-- | dev-ruby/metasploit_data_models/metasploit_data_models-2.0.0.ebuild | 62 | ||||
-rw-r--r-- | net-analyzer/metasploit/Manifest | 2 | ||||
-rw-r--r-- | net-analyzer/metasploit/metasploit-4.12.16.ebuild | 316 | ||||
-rw-r--r-- | net-analyzer/metasploit/metasploit-4.12.7.ebuild | 303 |
9 files changed, 0 insertions, 786 deletions
diff --git a/dev-ruby/metasploit-credential/Manifest b/dev-ruby/metasploit-credential/Manifest index d3f044af3c8f..e67f715eb9d2 100644 --- a/dev-ruby/metasploit-credential/Manifest +++ b/dev-ruby/metasploit-credential/Manifest @@ -1,2 +1 @@ -DIST metasploit-credential-2.0.3.gem 108032 SHA256 ce275e0d61aa3fba1e19b6b8bedc8c1ce655d44d58a1ca36f798c8762e08ee33 SHA512 df3289756fa26931ae8cdbbfa94efbbd370ac4f6e7acdb3188e6fdcbbe89d4a894cdeb673c0a4608764b1916691f2522bd3e658d97b7742ca7637e17c299ad3a WHIRLPOOL 9d1ba8ed612635b57e5147202823220748583b64abe3c1f1050d134cf2a2e1658e4dddc20174253c53d77d336d3ce11c6b1e8d1ef2de784ec9072a0f232bf150 DIST metasploit-credential-2.0.8.gem 110080 SHA256 b3d67ff530c92c0d090da633bfe12ecc60d2030d94d5881c42d86e3ba709ec7a SHA512 dac081be5347edd9f96e2e4956824e5982a1ab1ef13dd3113a1a5faf70e4dde570bb42ec404ab503b72ababbdae291d4b929946288452f712bf6a795177e1357 WHIRLPOOL cf99f674535494988866c8d86db19e8d5b8b5467a31a1cd988134dfb930f74ad67d066a0c4a299e4aa1105c89b6e4723f038574b39ea40049d3eeb36ffa49b9a diff --git a/dev-ruby/metasploit-credential/metasploit-credential-2.0.3.ebuild b/dev-ruby/metasploit-credential/metasploit-credential-2.0.3.ebuild deleted file mode 100644 index 3defb6548035..000000000000 --- a/dev-ruby/metasploit-credential/metasploit-credential-2.0.3.ebuild +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -USE_RUBY="ruby21" - -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" -IUSE="" -RESTRICT=test - -ruby_add_rdepend "dev-ruby/metasploit-concern:2.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.2.6:4.2 - dev-ruby/pg" diff --git a/dev-ruby/metasploit-model/Manifest b/dev-ruby/metasploit-model/Manifest index e4c8def6630a..9966bc91fc31 100644 --- a/dev-ruby/metasploit-model/Manifest +++ b/dev-ruby/metasploit-model/Manifest @@ -1,2 +1 @@ -DIST metasploit-model-2.0.0.gem 81408 SHA256 c40fa0c5160ea99de81c475e5d1b852155f8080f66b47683f2cb4c19faa91788 SHA512 42c73b34104a94b5352e64199d2edf98ccc53c3e169f6799ecb7433588ed918d6483fe24cbfeab32b0a8859bcbfb42504054f013cdff2f03bac489e97edfe8ff WHIRLPOOL b739f5d1e465c06f6d1c4e4ba49ddf9f1e49e229b570f11cbfa0ea587a7a2b863f4e6a9a7c9df26b23e9e04e33ce72e99843b6c77a4b8cad34dd82449f41c8c7 DIST metasploit-model-2.0.3.gem 81408 SHA256 011290db16ca8c84a82652be8481dca14c34edd8b0e2c9fd69f84ae1cc210fb4 SHA512 a6d77940e6b85925cc93c57f69910fde5c8eb2458d6707847be9f5856cfceee33304209e8c7076484151d9daf1f23cfe28cb0c00abb83176b7bc6c819fb128ec WHIRLPOOL a711cd41496acd8603a7020cda9aaed8cc8c84929e7a48db2a59fbdb29c5907d3224829d0bf41c39329c23441a3e1ec0e03848bdc3ebddc05571a0f4e9753a20 diff --git a/dev-ruby/metasploit-model/metasploit-model-2.0.0.ebuild b/dev-ruby/metasploit-model/metasploit-model-2.0.0.ebuild deleted file mode 100644 index 1fc00b4db282..000000000000 --- a/dev-ruby/metasploit-model/metasploit-model-2.0.0.ebuild +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -USE_RUBY="ruby21" - -inherit ruby-fakegem versionator - -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 ~arm ~x86" -#IUSE="development test" -RESTRICT=test -IUSE="" - -RDEPEND="${RDEPEND} !dev-ruby/metasploit-model:0" - -ruby_add_rdepend ">=dev-ruby/railties-4.2.6:4.2 - >=dev-ruby/activesupport-4.2.6:4.2 - >=dev-ruby/activemodel-4.2.6:4.2" -# 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 -# <dev-ruby/yard-0.8.7.4 )" - -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 - 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_data_models/Manifest b/dev-ruby/metasploit_data_models/Manifest index e9d92a0e5b40..2bbd975677c1 100644 --- a/dev-ruby/metasploit_data_models/Manifest +++ b/dev-ruby/metasploit_data_models/Manifest @@ -1,2 +1 @@ -DIST metasploit_data_models-2.0.0.gem 177152 SHA256 b5f32aeb00cab511c94212b7fa1b42631278d4766ab7b05f1c4fdf8e3c3655bb SHA512 4ff18ba09fe58e5846b745152739a6602fc144ca68240901f18791f7c6ffacc0a1d621fda222c86960ca59cd3034ef2fda4fc85dead669837e3c0a7c2ddc3f1d WHIRLPOOL 407460ac990f257a80c89c56463aef91ea48070d52225fc2116500ce822d5c5eb2880bd1fb21cb65a3ea3a0a725906dbe525cce5d18527030294ace776265a91 DIST metasploit_data_models-2.0.14.gem 182272 SHA256 2f89103f1a54a137744f47de605f63f960b369fff638da8c93af9336bee66241 SHA512 204505fd9073eaa7c9467ef8241f0cf3167f33e68eb4e5aac6101fc0b1fa68d2ec85e11ac9ce4fb80ae3db8ba6fcc0f7f2a93dacf9735c2d4d1d92fa0a41e70b WHIRLPOOL 2e25af8520a629468de0b20e01e0680c373fc4f1d1ef8b75f6c814572bf791f7a5270a282f6997bcd2bc86039d470021fa0c7f29d9cb5987e39d530c3a423d82 diff --git a/dev-ruby/metasploit_data_models/metasploit_data_models-2.0.0.ebuild b/dev-ruby/metasploit_data_models/metasploit_data_models-2.0.0.ebuild deleted file mode 100644 index 359e43b7c02b..000000000000 --- a/dev-ruby/metasploit_data_models/metasploit_data_models-2.0.0.ebuild +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -USE_RUBY="ruby21" - -inherit ruby-fakegem - -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="${PV}" -KEYWORDS="~amd64 ~arm" -RESTRICT=test -#IUSE="development test" -IUSE="" - -RDEPEND="${RDEPEND} !dev-ruby/metasploit_data_models:0" - -ruby_add_rdepend " - >=dev-ruby/activerecord-4.2.6:4.2[postgres] - >=dev-ruby/activesupport-4.2.6:4.2 - dev-ruby/pg - dev-ruby/postgres_ext - >=dev-ruby/railties-4.2.6:4.2 - >=dev-ruby/recog-2.0.0:* - dev-ruby/arel-helpers - >=dev-ruby/metasploit-concern-2.0.0 - >=dev-ruby/metasploit-model-2.0.0 - <dev-ruby/thor-2.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 -} - -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/net-analyzer/metasploit/Manifest b/net-analyzer/metasploit/Manifest index de6a1f6e366f..9c7572d5cd70 100644 --- a/net-analyzer/metasploit/Manifest +++ b/net-analyzer/metasploit/Manifest @@ -1,3 +1 @@ -DIST metasploit-4.12.16.tar.gz 23258256 SHA256 082f4109da2368fc4ec25a64ceae7655da80b3a46f650f86ff52d9bfac05c584 SHA512 6a95ddc848b95069bc425dd65ba4ed19be981d613cdb13d998ff1222f2ceddaf8b55c355243d69094b691e2a2d7580053284969c9a5133b2328c7d1743055101 WHIRLPOOL 70aa40de2c2b8884b3705e9d150f1b30a8477acc9c79ac1e491a0d9f15aa13b4d64697cf5e7e712173862ab96ecc76636b92cbc24ea228a5d14b9a4a420ac064 -DIST metasploit-4.12.7.tar.gz 23335841 SHA256 30d3fe6f0e3626e86d1497beb21f4ed304fb2f5f375823a5b91f5cbc9d762bae SHA512 6927876b577e1d2421eeabdd1abab90ac99aef02703c0b431eb664c855008639081af64dd82426b87114c8460ecd31ecb46cc89af1edf4f65a2e79b30d99675a WHIRLPOOL add23aad4f5f916510c1e879d25b182651c2bd22e10311ebf43347c8a5fc5056a1f9ee13906791754585bfea4ab742a005564347de7dabaa62f987301b4c0332 DIST metasploit-4.14.16.tar.gz 23726763 SHA256 c45e17fb3e63569294366806743d2cb0fe44b7173c031c019725ebf36f5922f2 SHA512 882968e68ff5adf10426f6e8480f3eac7cd9b289c1e641a91e537d31a434858f2c47b4f7b5bf23fcfc22eceecd2527eedb7eac3e9a8ad4a212187762b1b9aab2 WHIRLPOOL b634b804a701a0154b86ddb95f5159f80e76f7146032236fd32198af7f01f51dc56eef2f22eee2da2bbc382ed5fde51b5d8d5fcca1a9b5e81bb93a06c2f12b1d diff --git a/net-analyzer/metasploit/metasploit-4.12.16.ebuild b/net-analyzer/metasploit/metasploit-4.12.16.ebuild deleted file mode 100644 index ce2667a9c227..000000000000 --- a/net-analyzer/metasploit/metasploit-4.12.16.ebuild +++ /dev/null @@ -1,316 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -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 - ##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 ~arm" - 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 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/bcrypt-ruby - dev-ruby/bit-struct - dev-ruby/builder:3 - dev-ruby/bundler - dev-ruby/filesize - dev-ruby/jsobfu:0.3.0 - dev-ruby/json:* - dev-ruby/kissfft - dev-ruby/metasm:1.0.2 - >=dev-ruby/metasploit_data_models-2.0.0 - dev-ruby/meterpreter_bins:0.0.22 - dev-ruby/metasploit-payloads:1.1.13 - dev-ruby/metasploit_payloads-mettle:0.0.6 - >=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/recog:2.0.14 - dev-ruby/redcarpet - =dev-ruby/rkelly-remix-0.0.6 - dev-ruby/rex-arch - dev-ruby/rex-java - dev-ruby/rex-ole - dev-ruby/rex-powershell - dev-ruby/rex-random_identifier - dev-ruby/rex-registry - dev-ruby/rex-struct2 - dev-ruby/rex-text - dev-ruby/rex-zip - dev-ruby/sqlite3 - >=dev-ruby/pg-0.11 - dev-ruby/packetfu:1.1.11 - >=dev-ruby/rubyzip-1.1 - dev-ruby/rb-readline-r7 - dev-ruby/robots - dev-ruby/sshkey - dev-ruby/tzinfo:* - java? ( dev-ruby/rjb ) - 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/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 - " - -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" - epatch_user - - #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 - #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 - #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 - 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 - #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-<version> 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.12.7.ebuild b/net-analyzer/metasploit/metasploit-4.12.7.ebuild deleted file mode 100644 index 5690abb91dc3..000000000000 --- a/net-analyzer/metasploit/metasploit-4.12.7.ebuild +++ /dev/null @@ -1,303 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -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 - ##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 ~arm" - 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 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/bcrypt-ruby - dev-ruby/builder:3 - dev-ruby/bundler - dev-ruby/filesize - dev-ruby/jsobfu:0.3.0 - dev-ruby/json:* - dev-ruby/kissfft - dev-ruby/metasm:1.0.2 - >=dev-ruby/metasploit_data_models-2.0.0 - dev-ruby/meterpreter_bins:0.0.22 - dev-ruby/metasploit-payloads:1.1.11 - >=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/nokogiri - dev-ruby/octokit - dev-ruby/openssl-ccm:1.2.1 - dev-ruby/patch_finder - dev-ruby/recog:2.0.14 - dev-ruby/redcarpet - =dev-ruby/rkelly-remix-0.0.6 - dev-ruby/sqlite3 - >=dev-ruby/pg-0.11 - dev-ruby/packetfu:1.1.11 - >=dev-ruby/rubyzip-1.1 - dev-ruby/rb-readline-r7 - dev-ruby/robots - dev-ruby/tzinfo:* - java? ( dev-ruby/rjb ) - 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/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 - " - -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" - epatch_user - - #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 - #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 - #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 - 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 - #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-<version> 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" -} |