Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloud_enum: add package #4468

Merged
merged 6 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lists/to-release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cloud_enum
50 changes: 50 additions & 0 deletions packages/cloud_enum/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=cloud_enum
pkgver=0.7.r10.gd3c292c
pkgrel=1
pkgdesc='Multi-cloud OSINT tool. Enumerate public resources in AWS, Azure, and Google Cloud.'
arch=('any')
groups=('blackarch' 'blackarch-recon')
url='https://github.com/initstring/cloud_enum'
license=('MIT')
depends=('python')
makedepends=('git' 'python-setuptools' 'python-pip')
source=("git+https://github.com/initstring/$pkgname.git")
sha512sums=('SKIP')
install="$pkgname.install"

pkgver() {
cd $pkgname

( set -o pipefail
git describe --long --tags --abbrev=7 2>/dev/null |
sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "%s.%s" "$(git rev-list --count HEAD)" \
"$(git rev-parse --short=7 HEAD)"
)
}

package() {
cd $pkgname

install -dm 755 "$pkgdir/usr/bin"
install -Dm 644 requirements.txt "$pkgdir/usr/share/$pkgname/requirements.txt"
install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" *.md

install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

rm -rf LICENSE *.md .gitignore

cp -a * "$pkgdir/usr/share/$pkgname/"

cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
source /usr/share/$pkgname/venv/bin/activate
exec python /usr/share/$pkgname/cloud_enum.py "\$@"
EOF

chmod a+x "$pkgdir/usr/bin/$pkgname"
}

18 changes: 18 additions & 0 deletions packages/cloud_enum/cloud_enum.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
post_install() {
set -e
cd /usr/share/cloud_enum
python -m venv venv
source venv/bin/activate &&
pip install --isolated --root="/usr/share/cloud_enum" --prefix='venv' \
-r requirements.txt
pip install -e .
}

post_upgrade() {
post_install "$@"
}

post_remove() {
# /usr/share/cloud_enum/venv
rm -r /usr/share/cloud_enum
}
Loading