Skip to content

Commit

Permalink
gpp-decrypt: add package (#4469)
Browse files Browse the repository at this point in the history
* gpp-decrypt: add package

* Update PKGBUILD

* Update to-release

* Update packages/gpp-decrypt/PKGBUILD

Co-authored-by: Alexandre ZANNI <16578570+noraj@users.noreply.github.com>

---------

Co-authored-by: Alexandre ZANNI <16578570+noraj@users.noreply.github.com>
  • Loading branch information
D3vil0p3r and noraj authored Feb 26, 2025
1 parent 62883f1 commit 78a97cc
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions lists/to-release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gpp-decrypt
52 changes: 52 additions & 0 deletions packages/gpp-decrypt/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=gpp-decrypt
pkgver=14.c71c7a6
pkgrel=1
pkgdesc='Parse the Group Policy Preferences XML file which extracts the username and decrypts the cpassword attribute.'
arch=('any')
groups=('blackarch' 'blackarch-crypto')
url='https://github.com/t0thkr1s/gpp-decrypt'
license=('GPL-3.0-or-later')
depends=('python' 'python-colorama' 'python-crypto')
makedepends=('git')
source=("git+https://github.com/t0thkr1s/$pkgname.git")
sha512sums=('SKIP')

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)"
)
}

prepare() {
cd $pkgname

sed -i "s/banner = '''/banner = r'''/g" gpp-decrypt.py
}

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

rm -rf LICENSE *.md .gitignore Dockerfile

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

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

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

0 comments on commit 78a97cc

Please sign in to comment.