mirror of
https://github.com/pentoo/pentoo-overlay
synced 2025-12-06 08:25:01 +01:00
empire-6.0.2.ebuild
This commit is contained in:
parent
fc2e1e76ad
commit
909b4dd3d3
2 changed files with 138 additions and 0 deletions
|
|
@ -1 +1,2 @@
|
||||||
DIST empire-6.0.0.tar.gz 38108157 BLAKE2B f53ced8e3a90f51018ddd469455e0c165fb7af8aab769b2b75570dc2a2f814900d097988c208102b911896cb3b31b53e92119dfce3af20dbb7c2e307fc3ee5c6 SHA512 8de2ca9c46cf0c324dcf407b152e0dc0079078b9d771dda885e93b75645ea81eb335a2eb72a7f41995d56855abed0c58687ab63a5a8ff419b9b431b533215c8a
|
DIST empire-6.0.0.tar.gz 38108157 BLAKE2B f53ced8e3a90f51018ddd469455e0c165fb7af8aab769b2b75570dc2a2f814900d097988c208102b911896cb3b31b53e92119dfce3af20dbb7c2e307fc3ee5c6 SHA512 8de2ca9c46cf0c324dcf407b152e0dc0079078b9d771dda885e93b75645ea81eb335a2eb72a7f41995d56855abed0c58687ab63a5a8ff419b9b431b533215c8a
|
||||||
|
DIST empire-6.0.2.tar.gz 38107974 BLAKE2B 7169a51aa22895a738d85b5ae18867dfb10f78e59ff65db82ba7fffc725c8590e7fdab902b943bc1a80a0f3a827c10fd3b63052b725774a388c7d9aab2be894b SHA512 448ff62446132d736c4a1a6bc2d8abb0168d8c32841ecf2073cf3577e906cc29ea7f09bb3d227e8a8da635f0f107f36cfeed50ddd48e4bdb237c3cc8ce3f99dc
|
||||||
|
|
|
||||||
137
app-exploits/empire/empire-6.0.2.ebuild
Normal file
137
app-exploits/empire/empire-6.0.2.ebuild
Normal file
|
|
@ -0,0 +1,137 @@
|
||||||
|
# Copyright 1999-2024 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
DISTUTILS_USE_PEP517=poetry
|
||||||
|
PYTHON_COMPAT=( python3_{11..13} )
|
||||||
|
PYTHON_REQ_USE="sqlite"
|
||||||
|
|
||||||
|
inherit wrapper 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"
|
||||||
|
S="${WORKDIR}/Empire-${PV}"
|
||||||
|
|
||||||
|
LICENSE="BSD"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
IUSE="powershell java"
|
||||||
|
REQUIRED_USE="powershell? ( !x86 )
|
||||||
|
${PYTHON_REQUIRED_USE}"
|
||||||
|
|
||||||
|
# https://github.com/BC-SECURITY/Empire/issues/196
|
||||||
|
RDEPEND="${PYTHON_DEPS}
|
||||||
|
$(python_gen_cond_dep '
|
||||||
|
dev-python/urllib3[${PYTHON_USEDEP}]
|
||||||
|
dev-python/requests[${PYTHON_USEDEP}]
|
||||||
|
dev-python/macholib[${PYTHON_USEDEP}]
|
||||||
|
dev-python/pyopenssl[${PYTHON_USEDEP}]
|
||||||
|
dev-python/zlib_wrapper[${PYTHON_USEDEP}]
|
||||||
|
dev-python/jinja2[${PYTHON_USEDEP}]
|
||||||
|
dev-python/pyparsing[${PYTHON_USEDEP}]
|
||||||
|
dev-python/pymysql[${PYTHON_USEDEP}]
|
||||||
|
dev-python/sqlalchemy[${PYTHON_USEDEP}]
|
||||||
|
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||||
|
dev-python/sqlalchemy_utc[${PYTHON_USEDEP}]
|
||||||
|
dev-python/terminaltables3[${PYTHON_USEDEP}]
|
||||||
|
dev-python/pycryptodome[${PYTHON_USEDEP}]
|
||||||
|
dev-python/cryptography[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/fastapi-0.115.11[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/uvicorn-0.34.0[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/jq-1.8.0[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/aiofiles-24.1.0[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/python-multipart-0.0.20[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/python-socketio-5.12.1[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/flask-3.1.0[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/python-obfuscator-0.0.2[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/pyinstaller-6.12.0[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/packaging-24.2[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/netaddr-1.3.0[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/bcrypt-4.0.1[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/requests-file-2.1.0[${PYTHON_USEDEP}]
|
||||||
|
|
||||||
|
dev-python/pysecretsocks[${PYTHON_USEDEP}]
|
||||||
|
dev-python/donut-shellcode[${PYTHON_USEDEP}]
|
||||||
|
|
||||||
|
')
|
||||||
|
powershell? (
|
||||||
|
!x86? ( app-shells/pwsh-bin ) )
|
||||||
|
java? (
|
||||||
|
|| ( virtual/jre:* virtual/jdk:* ) )"
|
||||||
|
|
||||||
|
DEPEND="${RDEPEND}"
|
||||||
|
|
||||||
|
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 empire/ empire.py
|
||||||
|
|
||||||
|
# python_optimize "${D}/usr/share/${PN}/lib"
|
||||||
|
|
||||||
|
make_wrapper $PN \
|
||||||
|
"${PYTHON} /usr/share/${PN}/empire.py" \
|
||||||
|
"/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"
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue