acsccid-1.1.9.ebuild

This commit is contained in:
Anton Bolshakov 2023-03-30 13:09:30 +08:00
parent ff90021979
commit 2b5711c1e1
No known key found for this signature in database
GPG key ID: 32BDCED870788F04
3 changed files with 7 additions and 142 deletions

View file

@ -1,2 +1,2 @@
DIST acsccid-1.1.7.tar.bz2 460603 BLAKE2B 3bfd643282d03e7d29f54105f0f1060ecf3d649734e846d1a09501588e20b02c0bc6a103888fcbaec7b042ab564fddac0340a8508fee9dfd9125aaf329bf62c9 SHA512 22779b610d6aada3c5332ff7c54816389323f220aa53711b010ef03ebfd4f0021d67d151d3c517190eb721e44357cbdb2b0a67131c18de34367e8a1e6cff0cb3
DIST acsccid-1.1.8.tar.bz2 460279 BLAKE2B fc4ee71248e1d0362f6fecdbd17388070fa5d43077db2dd99a4f55933115c4e0e70d8ce7b07b6a3c807646df8a672dc28e32d58107da7645cef77ccd6383183a SHA512 1a9bbfcda071b19693df5cc3e75216778ba4abeffe421ec6a308af77f382229f0d980b5ae0c63022833018413ea9e69f5ae1e12fb720a2dc400ca081772f8bfb
DIST acsccid-1.1.9.tar.bz2 485875 BLAKE2B 66767e14b7fda6cab7ef3660b3d75d8d90db422d8b9357e3d129eea99fc786c3f39e736bcf2ff660c5995ecb61eb0129b9a3a70a2d4b51a7b24fe7ab313e07c3 SHA512 03c5d7f66bc701c6f74be9f791d70ed6c73fda342b04d08ca16d7188cb1de41ce49a4e81d6a8474e8a4e57b5c86a78d7ff343ed9fe9b5a0a3e9e76742de7f08b

View file

@ -1,7 +1,7 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
inherit autotools udev
@ -37,3 +37,7 @@ src_install() {
pkg_postinst() {
udev_reload
}
pkg_postrm() {
udev_reload
}

View file

@ -1,139 +0,0 @@
# 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/pydispatcher[${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/bcrypt[${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/flask-socketio[${PYTHON_USEDEP}]
dev-python/python-socketio[${PYTHON_USEDEP}]
dev-python/jq[${PYTHON_USEDEP}]
>=dev-python/websockify-0.10.0[${PYTHON_USEDEP}]
dev-python/pyperclip[${PYTHON_USEDEP}]
dev-python/pyvnc[${PYTHON_USEDEP}]
>=dev-python/donut-shellcode-0.9.2[${PYTHON_USEDEP}]
>=dev-python/flask-2.1.2[${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"
}