Skip to content

Commit

Permalink
add pinkerton (#4060)
Browse files Browse the repository at this point in the history
  • Loading branch information
noraj authored Jan 18, 2024
1 parent 29bb4c5 commit 597163d
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions packages/pinkerton/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=pinkerton
pkgver=1.6.r14.gda2099c
pkgrel=1
pkgdesc='JavaScript file crawler and secret finder.'
arch=('any')
groups=('blackarch' 'blackarch-recon' 'blackarch-webapp')
url='https://github.com/oppsec/Pinkerton'
license=('MIT')
depends=('python' 'openssl' 'python-rich' 'python-requests' 'python-jsbeautifier')
makedepends=('git')
source=("git+https://github.com/oppsec/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
cd $pkgname

git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
cd $pkgname

install -dm 755 "$pkgdir/usr/bin"
install -dm 755 "$pkgdir/usr/share/$pkgname"
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 .dockerignore Dockerfile *.txt

cp -a *.py src/ "$pkgdir/usr/share/$pkgname/"

cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec python /usr/share/$pkgname/main.py "\$@"
EOF

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

0 comments on commit 597163d

Please sign in to comment.