From 15835ac425793e803bd73fbe0d5e38f77b59d235 Mon Sep 17 00:00:00 2001 From: Antonio Date: Sun, 17 Nov 2024 22:30:05 +0100 Subject: [PATCH 1/4] nuclei: add nuclei-template support --- packages/nuclei/PKGBUILD | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/packages/nuclei/PKGBUILD b/packages/nuclei/PKGBUILD index 933c80607fc..94e6cb507d5 100644 --- a/packages/nuclei/PKGBUILD +++ b/packages/nuclei/PKGBUILD @@ -2,8 +2,8 @@ # See COPYING for license details. pkgname=nuclei -pkgver=v3.0.0.r972.gba6a050d4 -pkgrel=1 +pkgver=v3.0.0.r972.gba6a050 +pkgrel=2 epoch=2 groups=('blackarch' 'blackarch-scanner' 'blackarch-webapp' 'blackarch-recon' 'blackarch-fingerprint') @@ -13,13 +13,20 @@ url='https://github.com/projectdiscovery/nuclei' license=('MIT') depends=('nuclei-templates') makedepends=('git' 'go') -source=("git+https://github.com/projectdiscovery/$pkgname.git") -sha512sums=('SKIP') +source=("git+https://github.com/projectdiscovery/$pkgname.git" + "config.yaml") +sha512sums=('SKIP' + '33ae33a38717992094e09bad08dcb4d55d604c763c3709d1b01610add2ab64dae39368b443d8c8c216e5ce5f3ed30059aa640943a64a94a0fb3939c411fee662') pkgver() { cd $pkgname - git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' + ( 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() { @@ -38,8 +45,18 @@ build() { package() { cd $pkgname - install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname" + install -dm 755 "$pkgdir/usr/bin" + install -Dm 755 $pkgname "$pkgdir/usr/share/$pkgname/$pkgname" + install -Dm 755 ../config.yaml "$pkgdir/usr/share/$pkgname/config.yaml" install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md THANKS.md install -Dm 644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + + cat > "$pkgdir/usr/bin/$pkgname" << EOF +#!/bin/sh +cd /usr/share/$pkgname +exec ./$pkgname -config /usr/share/$pkgname/config.yaml "\$@" +EOF + + chmod a+x "$pkgdir/usr/bin/$pkgname" } From 9afd17cda526daac973a30e24c118e5dff2841c9 Mon Sep 17 00:00:00 2001 From: Antonio Date: Sun, 17 Nov 2024 22:31:01 +0100 Subject: [PATCH 2/4] Create config.yaml --- packages/nuclei/config.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 packages/nuclei/config.yaml diff --git a/packages/nuclei/config.yaml b/packages/nuclei/config.yaml new file mode 100644 index 00000000000..a8844406267 --- /dev/null +++ b/packages/nuclei/config.yaml @@ -0,0 +1,35 @@ +# Headers to include with all HTTP request +header: + - 'X-BugBounty-Hacker: h1/pentester' + +# Directory based template execution +templates: + - /usr/share/nuclei-templates/ + +# Template Filters +tags: exposures,cve +author: geeknik,pikpikcu,dhiyaneshdk +severity: critical,high,medium + +# Template Allowlist +# +# Note: This will take precedence over the .nuclei-ignore file and denylist +# entries (exclude-tags or exclude-templates list). +include-tags: dos,fuzz # Tag based inclusion +include-templates: # Template based inclusion + - vulnerabilities/xxx + - misconfiguration/xxxx + +# Template Denylist +exclude-tags: info # Tag based exclusion +exclude-templates: # Template based exclusion + - vulnerabilities/xxx + - misconfiguration/xxxx + +# Rate Limit configuration +rate-limit: 500 +bulk-size: 50 +concurrency: 50 + +# Init checks +disable-update-check: true From bb891ca91a412dbdd2cb0ac6f11135db41dee7c7 Mon Sep 17 00:00:00 2001 From: Antonio Date: Sun, 17 Nov 2024 22:31:37 +0100 Subject: [PATCH 3/4] nuclei-templates: bump version --- packages/nuclei-templates/PKGBUILD | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/nuclei-templates/PKGBUILD b/packages/nuclei-templates/PKGBUILD index e70112c0a21..6e2d8d30853 100644 --- a/packages/nuclei-templates/PKGBUILD +++ b/packages/nuclei-templates/PKGBUILD @@ -2,11 +2,11 @@ # See COPYING for license details. pkgname=nuclei-templates -pkgver=v10.0.3.r393.gf81e4e9033 +pkgver=v10.0.3.r423.gaf6ef96 pkgrel=1 epoch=1 pkgdesc='Community curated list of template files for the nuclei engine.' -groups=('blackarch-scanner') +groups=('blackarch' 'blackarch-scanner') arch=('any') url='https://github.com/projectdiscovery/nuclei-templates' license=('MIT') @@ -17,7 +17,12 @@ sha512sums=('SKIP') pkgver() { cd $pkgname - git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' + ( 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() { From 1f639dae339db12264f4a38ad74b76e36538285a Mon Sep 17 00:00:00 2001 From: Antonio Date: Sun, 17 Nov 2024 22:32:05 +0100 Subject: [PATCH 4/4] Update to-release --- lists/to-release | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lists/to-release b/lists/to-release index e69de29bb2d..4018b113275 100644 --- a/lists/to-release +++ b/lists/to-release @@ -0,0 +1,2 @@ +nuclei +nuclei-templates