empire-3.3.2.ebuild

This commit is contained in:
blshkv 2020-08-11 19:20:32 +08:00
parent 477eebae47
commit 5fc7b8c0af
No known key found for this signature in database
GPG key ID: 32BDCED870788F04
3 changed files with 1 additions and 129 deletions

View file

@ -1,3 +1,2 @@
DIST empire-3.2.3.tar.gz 9741091 BLAKE2B c8c441510efc3e137ab7867940558a4b78456ba5b8e7a4162b5439c9528043274a1b7d82c447530a78413227fb8aeffdb6f48a4f34615c4596d33ae336601f1c SHA512 8e26c4fb04184f4b694bcb0914a518be05c18042ea3ddce723919a83c1363191626d1a962495a9294c8f1f320f528b1e3946b6bab91bc042daad12e73591158c
DIST empire-3.3.0.tar.gz 10127452 BLAKE2B 022002d3212b5064d3f0035265d4bfbaafb915b4d95bee6e3ce45c1b2d3c007d50d04afa12d41337fea0ba71613ee2c14ca1610f3f9b5af95360dd7d4894b7d2 SHA512 15010da8dad89314db2f20b5e0b7a15c6adbd07a95256f95da86967e81e892037b25ce3f6d9eecaabf541b32508ff3d8de0fbbfde4a831ee3d0bab133672d4b5
DIST empire-3.3.1.tar.gz 10127697 BLAKE2B 3acb507af2cfb46ed29e48283068c3f9f7069fc144dd2dcdeef0925399bbb99d4a83e61a9ca1620a54e85c024f9946e1e1ef6cad1771fb58c4f1090b451eeb7f SHA512 e338c52b1b1c427558881b2eb4b3879143eb4af05418a98a698470aeda446c18cf81d0163fe3740a140cbc869cdc1eb05af1ef94ad9f394b49109cb366dd34bf
DIST empire-3.3.2.tar.gz 10134371 BLAKE2B 6fa3aa19296f9c4db3934c9c51efd4061170936a2c2cb6f2a2b4ec2923561b0f95da14613a337cbfcbfe1dc6f8ba22e2ca2dd642d209e444374176588a095459 SHA512 0683d4e0d694d67996fe5222562d8201d2bc0864d262313ebcc7494be28240103871839e44eef0f2dda76fca3ec70b8ccfd00838f38fc7bc496a5d62397e9d75

View file

@ -1,127 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
#https://github.com/BC-SECURITY/Empire/issues/196 python3.8
PYTHON_COMPAT=( python3_{6,7} )
PYTHON_REQ_USE="sqlite"
inherit eutils python-single-r1
DESCRIPTION="A post-exploitation framework"
HOMEPAGE="https://github.com/BC-SECURITY/Empire"
SRC_URI="https://github.com/BC-SECURITY/Empire/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
LICENSE="BSD"
SLOT="0"
IUSE="powershell java"
REQUIRED_USE="powershell? ( amd64 )"
# waiting for the upstream
# https://bugs.gentoo.org/684734
RDEPEND="${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/urllib3[${PYTHON_MULTI_USEDEP}]
dev-python/requests[${PYTHON_MULTI_USEDEP}]
dev-python/python-iptools[${PYTHON_MULTI_USEDEP}]
dev-python/pydispatcher[${PYTHON_MULTI_USEDEP}]
dev-python/flask[${PYTHON_MULTI_USEDEP}]
dev-python/macholib[${PYTHON_MULTI_USEDEP}]
dev-python/dropbox-sdk[${PYTHON_MULTI_USEDEP}]
dev-python/pyopenssl[${PYTHON_MULTI_USEDEP}]
dev-python/pyinstaller[${PYTHON_MULTI_USEDEP}]
dev-python/zlib_wrapper[${PYTHON_MULTI_USEDEP}]
dev-python/netifaces[${PYTHON_MULTI_USEDEP}]
dev-python/m2crypto[${PYTHON_MULTI_USEDEP}]
dev-python/jinja[${PYTHON_MULTI_USEDEP}]
dev-python/cryptography[${PYTHON_MULTI_USEDEP}]
dev-python/pyminifier[${PYTHON_MULTI_USEDEP}]
dev-python/xlutils[${PYTHON_MULTI_USEDEP}]
dev-python/pefile[${PYTHON_MULTI_USEDEP}]
dev-python/simplejson[${PYTHON_MULTI_USEDEP}]
dev-python/bcrypt[${PYTHON_MULTI_USEDEP}]
dev-python/pycryptodome[${PYTHON_MULTI_USEDEP}]
')
powershell? (
amd64? ( app-shells/pwsh-bin ) )
java? (
|| ( virtual/jre:* virtual/jdk:* ) )"
DEPEND="${RDEPEND}"
S="${WORKDIR}/Empire-${PV}"
pkg_setup() {
python-single-r1_pkg_setup
}
src_prepare() {
python_fix_shebang "${S}"
default
}
#https://github.com/BC-SECURITY/Empire/issues/39
src_install() {
insinto "/usr/share/${PN}"
doins -r data/ lib/ plugins/ setup/ empire
python_optimize "${D}/usr/share/${PN}/lib"
make_wrapper $PN \
"${PYTHON} /usr/share/${PN}/empire" \
"/usr/share/${PN}"
dodoc README.md Dockerfile changelog
}
pkg_config() {
local _yesno_ask
local _em_home="${EROOT}/usr/share/${PN}"
pushd "${_em_home}" >/dev/null || die
if [ -f "${_em_home}/data/empire.db" ]; then
ewarn "Drop old database "${_em_home}/data/empire.db" for new configuring ..."
read -r -p " [>] Are you sure? [y/N] " _yesno_ask
if [[ ${_yesno_ask,,} =~ ^(yes|y)$ ]]; then
rm -f data/empire.db > /dev/null 2>&1 || die
else
return
fi
fi
ebegin "Press ENTER to create password for database or Control-C to abort now"
python3 setup/setup_database.py
eend ${?} || die
if [ -f "${_em_home}/data/empire-chain.pem" ] || [ -f "${_em_home}/data/empire-priv.key" ]; then
ewarn "Drop old ${_em_home}/data/empire-chain.pem and generate new cert ..."
read -r -p " [>] Are you sure? [y/N] " _yesno_ask
if [[ ${_yesno_ask,,} =~ ^(yes|y)$ ]]; then
rm -f data/{empire-chain.pem,empire-priv.key} > /dev/null 2>&1 || die
else
return
fi
fi
openssl req -newkey rsa:2048 -new -nodes -x509 \
-subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.pentoo.ch" \
-keyout data/empire-priv.key \
-out data/empire-chain.pem || die
popd >/dev/null || die
}
pkg_postinst() {
ewarn "\nWarning. This software does not support system-wide installation"
ewarn "See the following bug report for more details:"
ewarn "https://github.com/BC-SECURITY/Empire/issues/39"
ewarn
ewarn "You need to run it from /usr/share/${PN} directory under 'root' account"
ewarn "\nPlease configure your installation before using:"
ewarn " emerge --config \"=${CATEGORY}/${PF}\"\n"
}