Skip to content

Commit

Permalink
to-release: released packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
noptrix committed Dec 28, 2024
1 parent ae8584d commit 42b17a0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 25 deletions.
4 changes: 0 additions & 4 deletions lists/to-release
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
empire
python-md2pdf
python-obfuscator
python-secretsocks
15 changes: 1 addition & 14 deletions packages/empire/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,7 @@ arch=('any')
groups=('blackarch' 'blackarch-automation')
url='https://github.com/BC-SECURITY/Empire'
license=('BSD-3-Clause')
depends=('python' 'mariadb' 'openssl' 'powershell')
#depends=('python' 'mariadb' 'openssl' 'powershell' 'python-urllib3'
# 'python-requests' 'python-iptools' 'python-macholib' 'python-dropbox'
# 'python-pyopenssl' 'python-zlib_wrapper' 'python-jinja'
# 'python-xlutils' 'python-pyparsing' 'python-pymysql'
# 'python-sqlalchemy' 'python-pyaml' 'python-sqlalchemy-utc'
# 'python-prompt_toolkit' 'python-terminaltables' 'python-humanize'
# 'python-pycryptodome' 'python-cryptography' 'python-fastapi' 'uvicorn'
# 'python-jq' 'python-aiofiles' 'python-python-multipart' 'python-jose'
# 'python-passlib' 'python-websockify' 'python-websockets'
# 'python-pyperclip' 'python-pyvnc' 'python-socketio' 'python-flask'
# 'python-secretsocks' 'donut' 'python-obfuscator' 'pyinstaller'
# 'python-md2pdf' 'python-tabulate' 'python-stix2' 'python-docopt-ng'
# 'python-packaging' 'python-bcrypt')
depends=('python' 'mariadb' 'openssl')
makedepends=('git' 'python-setuptools' 'python-pip')
optdepends=(
'xar: enables generating .dmg stagers'
Expand Down
16 changes: 9 additions & 7 deletions packages/empire/empire.install
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ post_install() {

# Check if the directory does NOT exist OR is empty
MYSQL_DATA_DIR="/var/lib/mysql"
if [ ! -d "$MYSQL_DATA_DIR" ] || [ -z "$(ls -A "$MYSQL_DATA_DIR" 2>/dev/null)" ]; then
if [ ! -d "$MYSQL_DATA_DIR" ] ||
[ -z "$(ls -A "$MYSQL_DATA_DIR" 2>/dev/null)" ]; then
echo "MySQL data directory is missing or empty. Initializing MariaDB..."

# Initialize MariaDB
Expand All @@ -21,16 +22,17 @@ post_install() {
mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'empire_user'@'localhost' WITH GRANT OPTION;" || true
mysql -u root -e "FLUSH PRIVILEGES;" || true
systemctl restart mysql
}
}

post_upgrade() {
post_install "$@"
}

post_remove() {
# Check if the directory exists to avoid errors if it doesn't
if [[ -d /usr/share/empire ]]; then
rm -rf /usr/share/empire
echo "Removed /usr/share/empire"
fi
# Check if the directory exists to avoid errors if it doesn't
if [[ -d /usr/share/empire ]]; then
rm -rf /usr/share/empire
echo "Removed /usr/share/empire"
fi
}

0 comments on commit 42b17a0

Please sign in to comment.