This commit is contained in:
blshkv 2018-12-16 22:10:28 +08:00
parent 1b8bd114b1
commit e01b0fcd3f
No known key found for this signature in database
GPG key ID: 273E3E90D1A6294F
2 changed files with 28 additions and 16 deletions

View file

@ -21,18 +21,15 @@ fi
DESCRIPTION="A post-exploitation framework with Windows/Linux agents"
HOMEPAGE="https://github.com/EmpireProject/Empire"
LICENSE="BSD-3-Clause"
LICENSE="BSD-3"
SLOT="0"
#WIP
#KEYWORDS="~amd64 ~x86"
IUSE="java"
KEYWORDS="~amd64 ~x86"
IUSE="powershell java"
RDEPEND="dev-lang/swig
dev-python/lxml
dev-python/pyminifier
dev-python/xlrd
dev-python/xlwt
dev-python/xlrd[${PYTHON_USEDEP}]
dev-python/xlwt[${PYTHON_USEDEP}]
>=dev-python/urllib3-1.21.1[${PYTHON_USEDEP}]
>=dev-python/requests-2.18.4[${PYTHON_USEDEP}]
@ -54,6 +51,7 @@ RDEPEND="dev-lang/swig
dev-python/pefile[${PYTHON_USEDEP}]
powershell? ( amd64? ( dev-lang/powershell-bin ) )
java? ( virtual/jre:* )"
DEPEND="${RDEPEND}
@ -61,14 +59,26 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/Empire-${PV}"
pkg_postinst() {
elog "You need to prepare the database by running:"
elog "emerge --config =empire-${PV}"
src_prepare() {
sed -i "s|STAGING_KEY, INSTALL_PATH|STAGING_KEY, \"/usr/$(get_libdir)/${PN}/\"|" ./setup/setup_database.py
echo | python2 ./setup/setup_database.py
python_fix_shebang ./empire
default
}
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"
einfo "Run setup/setup_database.py to create empire.db"
src_install() {
# should be as simple as copying everything into the target...
dodir /usr/$(get_libdir)/${PN}
cp -R "${S}"/* "${D}"/usr/$(get_libdir)/${PN} || die "Copy files failed"
# dosym "${EPREFIX}"/usr/$(get_libdir)/${PN}/${PN}.py /usr/bin/${PN}
newbin - empire <<-EOF
#!/bin/sh
cd /usr/lib/empire
./empire \${@}
EOF
}
pkg_postinst() {
elog "Warning. This software does not support system-wide installation"
elog "You need to run it from /usr/lib/empire directory under 'root' account"
}

View file

@ -128,3 +128,5 @@ net-analyzer/subfinder
~net-analyzer/xsstrike-3.1.1
~net-analyzer/responder-2.3.3.9
~app-exploits/empire-2.5