From a2b384af7554fb54dd121e2104f0de39dbca6eaf Mon Sep 17 00:00:00 2001 From: Alexandre ZANNI <16578570+noraj@users.noreply.github.com> Date: Sun, 1 Dec 2024 20:36:08 +0100 Subject: [PATCH] add netscout (#4413) --- packages/netscout/PKGBUILD | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 packages/netscout/PKGBUILD diff --git a/packages/netscout/PKGBUILD b/packages/netscout/PKGBUILD new file mode 100644 index 00000000000..55e3845ae07 --- /dev/null +++ b/packages/netscout/PKGBUILD @@ -0,0 +1,47 @@ +# This file is part of BlackArch Linux ( https://www.blackarch.org/ ). +# See COPYING for license details. + +pkgname=netscout +pkgver=37.2f409df +pkgrel=1 +pkgdesc="OSINT tool that finds domains, subdomains, directories, endpoints and files." +arch=('any') +groups=('blackarch' 'blackarch-recon' 'blackarch-scanner') +url="https://github.com/caio-ishikawa/netscout" +license=('MIT') +makedepends=('git' 'go') +source=("git+$url.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)" + ) +} + +build() { + cd $pkgname + + GOPATH="$srcdir" go mod download + GOPATH="$srcdir" go build \ + -trimpath \ + -buildmode=pie \ + -mod=readonly \ + -modcacherw \ + -ldflags "-s -w" \ + -o $pkgname . +} + +package() { + cd $pkgname + + install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname" + install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md + install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} +