mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-04 18:40:19 +02:00
empire-5.1.2.ebuild
This commit is contained in:
parent
2b5711c1e1
commit
40d8a7996d
2 changed files with 146 additions and 1 deletions
|
|
@ -1,2 +1,2 @@
|
|||
DIST empire-4.10.0.tar.gz 47761852 BLAKE2B 5324382017112929f1f4d0d018e3b2cc44457d00836eddb9b91a63a8196636a1418444b8f71da3c586b23b1c4b05cec5ea2edbeb65c94b0c5f55bb8af0878f03 SHA512 b66a2538ccc968d2bf2225ebf65fd3e04d33ccc7392bb7d06b2bf1cb5f7b0b215d12c00d03721659d7e55a92ae1a7d08802cbb9deb6f6e8be55aaf6cb8a00002
|
||||
DIST empire-5.0.4.tar.gz 49429451 BLAKE2B 3fa74351d1160be5040bfd316594953825acb5af7a14b30cba5be1c4defbb74848f214a7bd97ecd7494368efecc50dcf2af1d409f04d8e7fd76c369169494aa6 SHA512 23fca8d7c158d8e001bd58c1623a6494b6a101f438b293dffb78b89f51153451e226fbfffa34be0de054fd550f3012bffe0315e8138a5bc8b5f76c896fb823fa
|
||||
DIST empire-5.1.2.tar.gz 49428498 BLAKE2B d78192b2902192aea45f6095c76fceb5329200174ed8dd2192e029081cec8e096c62bae26482c66ade89c0fe0945a2885675d362c8c0715e450689d3a191717f SHA512 1d343f829d87d2f9eea5c0ada4977646939c622a2ff27db5cbcc8c221c74ae769d9586617150357820b2dad9a75a37bc54f92bda1804dbead72390a90fa871c6
|
||||
|
|
|
|||
145
app-exploits/empire/empire-5.1.2.ebuild
Normal file
145
app-exploits/empire/empire-5.1.2.ebuild
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DISTUTILS_USE_PEP517=poetry
|
||||
PYTHON_COMPAT=( python3_{10..11} )
|
||||
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? ( !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/python-iptools[${PYTHON_USEDEP}]
|
||||
dev-python/macholib[${PYTHON_USEDEP}]
|
||||
dev-python/dropbox-sdk[${PYTHON_USEDEP}]
|
||||
dev-python/pyopenssl[${PYTHON_USEDEP}]
|
||||
dev-python/pyinstaller[${PYTHON_USEDEP}]
|
||||
dev-python/zlib_wrapper[${PYTHON_USEDEP}]
|
||||
dev-python/netifaces[${PYTHON_USEDEP}]
|
||||
dev-python/jinja[${PYTHON_USEDEP}]
|
||||
dev-python/xlutils[${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/prompt-toolkit-3.0.9[${PYTHON_USEDEP}]
|
||||
>=dev-python/terminaltables-3.1.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/docopt-0.6.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/humanize-3.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pydantic-1.8.1[${PYTHON_USEDEP}]
|
||||
dev-python/pycryptodome[${PYTHON_USEDEP}]
|
||||
dev-python/cryptography[${PYTHON_USEDEP}]
|
||||
>=dev-python/fastapi-0.70[${PYTHON_USEDEP}]
|
||||
>=dev-python/uvicorn-0.14.0[${PYTHON_USEDEP}]
|
||||
dev-python/jq[${PYTHON_USEDEP}]
|
||||
>=dev-python/aiofiles-0.7.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-multipart-0.0.5[${PYTHON_USEDEP}]
|
||||
dev-python/python-jose[${PYTHON_USEDEP}]
|
||||
dev-python/passlib[${PYTHON_USEDEP}]
|
||||
>=dev-python/websockify-0.10.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/websockets-10.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyperclip-1.8.2[${PYTHON_USEDEP}]
|
||||
dev-python/pyvnc[${PYTHON_USEDEP}]
|
||||
dev-python/python-socketio[${PYTHON_USEDEP}]
|
||||
>=dev-python/flask-2.1.2[${PYTHON_USEDEP}]
|
||||
dev-python/donut-shellcode[${PYTHON_USEDEP}]
|
||||
dev-python/pysecretsocks[${PYTHON_USEDEP}]
|
||||
')
|
||||
powershell? (
|
||||
!x86? ( 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 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