Skip to content
Merged

v3.6.0 #6657

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
6a6de38
Multi Port Support Added - JS
pussycat0x Sep 27, 2025
7e04181
minor -changes
pussycat0x Sep 27, 2025
ae61257
Merge branch 'dev' into multiport-js
Mzack9999 Oct 6, 2025
0759026
restoring basic sequential multiport support
Mzack9999 Oct 6, 2025
8c56052
better error handling
Mzack9999 Oct 6, 2025
c3750be
feat(openapi/swagger): direct fuzzing using target url
roiswd Oct 19, 2025
1684f41
fix (openapi/swagger): improve error handling and tmpDir cleanup
roiswd Oct 20, 2025
f0429aa
fix(openapi/swagger): err shadowing on write failure
roiswd Oct 20, 2025
89cfb75
fix(openapi/swagger): remove discarded error in defer
roiswd Oct 20, 2025
f57bd8c
fix(openapi/swagger): linter and url validation
roiswd Oct 21, 2025
e168f8d
fix(openapi/swagger): remove code duplication
roiswd Oct 21, 2025
6f59472
reusing dialer
Mzack9999 Oct 29, 2025
c814128
removing debug log
Mzack9999 Oct 29, 2025
17360cb
fix: restore parallel processing in workflow & file proto
dwisiswant0 Sep 23, 2025
984deac
test: adds `Test(FileProtocol|Workflows)ConcurrentExecution` tests
dwisiswant0 Sep 23, 2025
e60f415
chore(file): satisfy lints
dwisiswant0 Sep 23, 2025
ed1c575
refactor(integration-test): enhance debug mode detects
dwisiswant0 Sep 24, 2025
133e8b9
fix(core): race cond in workflow execution
dwisiswant0 Sep 25, 2025
1093bbc
introducing workflow sequential mode
Mzack9999 Oct 31, 2025
f544ea7
Revert "introducing workflow sequential mode"
dwisiswant0 Nov 2, 2025
69c831b
refactor(core): keep workflow exec seq
dwisiswant0 Nov 2, 2025
fb93cbe
test(core): rm unused tests
dwisiswant0 Nov 2, 2025
2829fd3
fix(sdk): configure tmpDir for SDK
AuditeMarlow Nov 7, 2025
7b0c6fb
docs(sdk): update comment to more accurately reflect purpose
AuditeMarlow Nov 7, 2025
96bfb2b
feat(sdk): add tmpDir configuration option for SDK users
AuditeMarlow Nov 10, 2025
efcc8e9
fix(sdk): init default engine tmpDir when unconfigured
AuditeMarlow Nov 10, 2025
87d62d3
style(sdk): remove unnecessary else block
AuditeMarlow Nov 10, 2025
3eff414
feat(sdk): create parent & tmp dir in WithTemporaryDirectory
AuditeMarlow Nov 10, 2025
954c825
test(cmd): enable `BenchmarkRunEnumeration/Default` bench
dwisiswant0 Nov 12, 2025
0f5d0d7
test(cmd): collect CPU & heap profiles
dwisiswant0 Nov 12, 2025
3a4e436
chore(cmd): satisfy lints
dwisiswant0 Nov 12, 2025
141f34a
Merge pull request #6610 from projectdiscovery/feat-result-upload
Mzack9999 Nov 15, 2025
7877341
feat: write resume file specified by flag
circleous Nov 17, 2025
a42dd7a
updating docs
Mzack9999 Nov 18, 2025
6730f52
chore(deps): bump the modules group with 6 updates
dependabot[bot] Nov 17, 2025
d20240b
Merge pull request #6616 from circleous/feat-resume-file
Mzack9999 Nov 18, 2025
e70044a
Merge pull request #6603 from projectdiscovery/dwisiswant0/test/cmd/e…
Mzack9999 Nov 18, 2025
8b8a3a1
refactor(sdk): don't create parentDir when configuring tmpDir
AuditeMarlow Nov 18, 2025
9b37f1b
adding test case
Mzack9999 Nov 18, 2025
c746a8f
lint
Mzack9999 Nov 18, 2025
232de93
removing unused check
Mzack9999 Nov 18, 2025
761c7c0
adding multiport template
Mzack9999 Nov 18, 2025
4e8843a
Merge branch 'dev' into multiport-js
Mzack9999 Nov 18, 2025
3ea8dc2
refactor test
Mzack9999 Nov 19, 2025
146fb5f
Merge pull request #6596 from guardian360/bugfix-6595-configure-tmpdi…
Mzack9999 Nov 19, 2025
50b43f2
Merge pull request #6501 from projectdiscovery/multiport-js
Mzack9999 Nov 19, 2025
aad0e51
chore(deps): bump golang.org/x/crypto
dependabot[bot] Nov 20, 2025
ad1e6f8
feat(variables): check for undefined params for lazy eval (#6618)
dwisiswant0 Nov 21, 2025
a52e675
chore(deps): bump github.com/projectdiscovery/fastdialer@v0.4.16
dwisiswant0 Nov 21, 2025
a754e7d
Merge pull request #6624 from projectdiscovery/dwisiswant0/chore/deps…
Mzack9999 Nov 21, 2025
d5d8d50
fix(interactsh): skip DNS lookups on interactsh domains (#6614)
dwisiswant0 Nov 21, 2025
cf44afb
feat: bump dsl with deserialization helpers
Ice3man543 Nov 23, 2025
c32cff8
Merge pull request #6493 from projectdiscovery/dwisiswant0/fix/restor…
dogancanbakir Nov 23, 2025
528caa8
Merge pull request #6542 from roiswd/feat-openapi-direct-fuzzing
dogancanbakir Nov 23, 2025
f63cad9
Merge pull request #6625 from projectdiscovery/add-deserialization-he…
Mzack9999 Nov 24, 2025
2997735
chore: omit unnecessary reassignment (#6622)
ledigang Nov 24, 2025
c1878b6
disable stale workflow for enhancements
dogancanbakir Nov 25, 2025
78ccfc2
ci: cache go-rod browser (#6640)
dwisiswant0 Nov 25, 2025
0aba8e5
chore(deps): bump actions/checkout from 5 to 6 in the workflows group
dependabot[bot] Nov 25, 2025
2978819
do not exempt abandoned issues and prs
dogancanbakir Nov 27, 2025
29dfd67
Merge pull request #6637 from projectdiscovery/6636_disable_stale_for…
Mzack9999 Nov 28, 2025
7ea72b5
ci: apply free-disk-space on tests
dwisiswant0 Nov 28, 2025
1a8f4d4
Merge pull request #6642 from projectdiscovery/dwisiswant0/ci/tests/a…
Mzack9999 Nov 28, 2025
7e151de
chore: bump PD modules & update `httputil` calls (#6629)
dependabot[bot] Nov 30, 2025
3dab87b
chore(deps): bump the modules group with 11 updates
dependabot[bot] Dec 1, 2025
9102f33
feat(loader): implement persistent metadata cache (#6630)
dwisiswant0 Dec 4, 2025
f181a69
chore: bump version
dwisiswant0 Dec 4, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/auto-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
token: ${{ secrets.DEPENDABOT_PAT }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compat-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/go/compat-checks@v1
with:
release-test: true
2 changes: 1 addition & 1 deletion .github/workflows/generate-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
if: "${{ !endsWith(github.actor, '[bot]') }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/go@v1
- uses: projectdiscovery/actions/setup/git@v1
- run: make syntax-docs
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/generate-pgo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ jobs:
LIST_FILE: "/tmp/targets-${{ matrix.targets }}.txt"
PROFILE_MEM: "/tmp/nuclei-profile-${{ matrix.targets }}-targets"
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/git@v1
- uses: projectdiscovery/actions/setup/go@v1
- uses: projectdiscovery/actions/cache/nuclei@v1
- name: Generate list
run: for i in {1..${{ matrix.targets }}}; do echo "https://honey.scanme.sh/?_=${i}" >> "${LIST_FILE}"; done
# NOTE(dwisiswant0): use `-no-mhe` flag to get better samples.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/govulncheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
env:
OUTPUT: "/tmp/results.sarif"
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/go@v1
- run: go install golang.org/x/vuln/cmd/govulncheck@latest
- run: govulncheck -scan package -format sarif ./... > $OUTPUT
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/perf-regression.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ jobs:
env:
BENCH_OUT: "/tmp/bench.out"
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/go@v1
- uses: projectdiscovery/actions/cache/go-rod-browser@v1
- uses: projectdiscovery/actions/cache/nuclei@v1
- run: make build-test
- run: ./bin/nuclei.test -test.run - -test.bench=. -test.benchmem ./cmd/nuclei/ | tee $BENCH_OUT
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/perf-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
LIST_FILE: "/tmp/targets-${{ matrix.count }}.txt"
PROFILE_MEM: "/tmp/nuclei-perf-test-${{ matrix.count }}"
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/go@v1
- run: make verify
- name: Generate list
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
release:
runs-on: ubuntu-latest-16-cores
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: projectdiscovery/actions/setup/go@v1
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ jobs:
it, please comment or feel free to reopen it.
close-issue-label: "Status: Abandoned"
close-pr-label: "Status: Abandoned"
exempt-issue-labels: "Status: Abandoned"
exempt-pr-labels: "Status: Abandoned"
exempt-issue-labels: "Type: Enhancement"
37 changes: 28 additions & 9 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ jobs:
if: "${{ !endsWith(github.actor, '[bot]') }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/go@v1
- uses: projectdiscovery/actions/cache/go-rod-browser@v1
- uses: projectdiscovery/actions/golangci-lint/v2@v1

tests:
Expand All @@ -35,8 +36,19 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: "${{ matrix.os }}"
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/go@v1
- uses: projectdiscovery/actions/cache/go-rod-browser@v1
- uses: projectdiscovery/actions/cache/nuclei@v1
- uses: projectdiscovery/actions/free-disk-space@v1
with:
llvm: 'false'
php: 'false'
mongodb: 'false'
mysql: 'false'
misc-packages: 'false'
docker-images: 'false'
tools-cache: 'false'
- run: make vet
- run: make build
- run: make test
Expand All @@ -52,8 +64,10 @@ jobs:
needs: ["tests"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/go@v1
- uses: projectdiscovery/actions/cache/go-rod-browser@v1
- uses: projectdiscovery/actions/cache/nuclei@v1
- name: "Simple"
run: go run .
working-directory: examples/simple/
Expand All @@ -74,9 +88,11 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/go@v1
- uses: projectdiscovery/actions/cache/nuclei@v1
- uses: projectdiscovery/actions/setup/python@v1
- uses: projectdiscovery/actions/cache/go-rod-browser@v1
- run: bash run.sh "${{ matrix.os }}"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
Expand All @@ -93,9 +109,11 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/go@v1
- uses: projectdiscovery/actions/cache/nuclei@v1
- uses: projectdiscovery/actions/setup/python@v1
- uses: projectdiscovery/actions/cache/go-rod-browser@v1
- run: bash run.sh
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
Expand All @@ -106,8 +124,9 @@ jobs:
needs: ["tests"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/go@v1
- uses: projectdiscovery/actions/cache/go-rod-browser@v1
- run: make template-validate

codeql:
Expand All @@ -119,7 +138,7 @@ jobs:
contents: read
security-events: write
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: github/codeql-action/init@v4
with:
languages: 'go'
Expand All @@ -131,7 +150,7 @@ jobs:
needs: ["tests"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/go@v1
- uses: projectdiscovery/actions/goreleaser@v1

Expand All @@ -143,7 +162,7 @@ jobs:
TARGET_URL: "http://scanme.sh/a/?b=c"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- run: make build
- name: "Setup environment (push)"
if: ${{ github.event_name == 'push' }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ TARGET:
-u, -target string[] target URLs/hosts to scan
-l, -list string path to file containing a list of target URLs/hosts to scan (one per line)
-eh, -exclude-hosts string[] hosts to exclude to scan from the input list (ip, cidr, hostname)
-resume string resume scan using resume.cfg (clustering will be disabled)
-resume string resume scan from and save to specified file (clustering will be disabled)
-sa, -scan-all-ips scan all the IP's associated with dns record
-iv, -ip-version string[] IP version to scan of hostname (4,6) - (default 4)

Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Nuclei是一款注重于可配置性、可扩展性和易用性的基于模板
目标:
-u, -target string[] 指定扫描的目标URL/主机(多个目标则指定多个-u参数)
-l, -list string 指定包含要扫描的目标URL/主机列表的文件路径(一行一个)
-resume string 使用指定的resume.cfg文件恢复扫描(将禁用请求聚类)
-resume string 从指定文件恢复扫描并保存到指定文件(将禁用请求聚类)
-sa, -scan-all-ips 扫描由目标解析出来的所有IP(针对域名对应多个IP的情况)
-iv, -ip-version string[] 要扫描的主机名的IP版本(4,6)-(默认为4)

Expand Down
2 changes: 1 addition & 1 deletion README_ES.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ TARGET:
-u, -target string[] URLs/hosts a escanear
-l, -list string ruta al archivo que contiene la lista de URLs/hosts a escanear (uno por línea)
-eh, -exclude-hosts string[] hosts a excluir para escanear de la lista de entrada (ip, cidr, hostname)
-resume string reanudar el escaneo usando resume.cfg (la clusterización quedará inhabilitada)
-resume string reanudar el escaneo desde y guardar en el archivo especificado (la clusterización quedará inhabilitada)
-sa, -scan-all-ips escanear todas las IP asociadas al registro dns
-iv, -ip-version string[] versión IP a escanear del nombre de host (4,6) - (por defecto 4)

Expand Down
2 changes: 1 addition & 1 deletion README_ID.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Flags:
TARGET:
-u, -target string[] target URLs/hosts to scan
-l, -list string path to file containing a list of target URLs/hosts to scan (one per line)
-resume string resume scan using resume.cfg (clustering will be disabled)
-resume string resume scan from and save to specified file (clustering will be disabled)
-sa, -scan-all-ips scan all the IP's associated with dns record
-iv, -ip-version string[] IP version to scan of hostname (4,6) - (default 4)

Expand Down
2 changes: 1 addition & 1 deletion README_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Nucleiは、広範な設定可能性、大規模な拡張性、および使い
ターゲット:
-u, -target string[] スキャンする対象のURL/ホスト
-l, -list string スキャンする対象のURL/ホストのリストが含まれているファイルへのパス(1行に1つ)
-resume string resume.cfgを使用してスキャンを再開(クラスタリングは無効になります)
-resume string 指定されたファイルからスキャンを再開し、指定されたファイルに保存(クラスタリングは無効になります)
-sa, -scan-all-ips DNSレコードに関連付けられているすべてのIPをスキャン
-iv, -ip-version string[] ホスト名のスキャンするIPバージョン(4,6)-(デフォルトは4)

Expand Down
2 changes: 1 addition & 1 deletion README_KR.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Nuclei는 빠르고, 템플릿 기반의 취약점 스캐너로
TARGET:
-u, -target string[] 스캔할 대상 URL/호스트
-l, -list string 스캔할 대상 URL/호스트 목록이 있는 파일 경로 (한 줄에 하나씩)
-resume string resume.cfg를 사용하여 스캔 재개 (클러스터링은 비활성화됨)
-resume string 지정된 파일에서 스캔을 재개하고 지정된 파일에 저장 (클러스터링은 비활성화됨)
-sa, -scan-all-ips dns 레코드와 관련된 모든 IP 스캔
-iv, -ip-version string[] 스캔할 호스트의 IP 버전 (4,6) - (기본값 4)

Expand Down
2 changes: 1 addition & 1 deletion README_PT-BR.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ TARGET:
-u, -target string[] URLs/hosts a serem escaneados
-l, -list string caminho do arquivo contendo a lista de URLs/hosts a serem escaneados (um por linha)
-eh, -exclude-hosts string[] hosts a serem excluídos do escaneamento na lista de entrada (ip, cidr, hostname)
-resume string retomar o escaneamento usando resume.cfg (a clusterização será desabilitada)
-resume string retomar o escaneamento a partir de e salvar no arquivo especificado (a clusterização será desabilitada)
-sa, -scan-all-ips escanear todos os IPs associados ao registro DNS
-iv, -ip-version string[] versão de IP a escanear do nome do host (4,6) - (padrão 4)

Expand Down
29 changes: 26 additions & 3 deletions cmd/integration-test/integration-test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
"regexp"
"runtime"
"slices"
"strings"

"github.com/kitabisa/go-ci"
Expand All @@ -24,7 +25,7 @@ type TestCaseInfo struct {
}

var (
debug = os.Getenv("DEBUG") == "true"
debug = isDebugMode()
customTests = os.Getenv("TESTS")
protocol = os.Getenv("PROTO")

Expand Down Expand Up @@ -60,6 +61,7 @@ var (
"matcher-status": matcherStatusTestcases,
"exporters": exportersTestCases,
}

// flakyTests are run with a retry count of 3
flakyTests = map[string]bool{
"protocols/http/self-contained-file-input.yaml": true,
Expand Down Expand Up @@ -90,11 +92,12 @@ func main() {
}

// start fuzz playground server
defer fuzzplayground.Cleanup()
server := fuzzplayground.GetPlaygroundServer()
defer func() {
fuzzplayground.Cleanup()
_ = server.Close()
}()

go func() {
if err := server.Start("localhost:8082"); err != nil {
if !strings.Contains(err.Error(), "Server closed") {
Expand All @@ -104,7 +107,6 @@ func main() {
}()

customTestsList := normalizeSplit(customTests)

failedTestTemplatePaths := runTests(customTestsList)

if len(failedTestTemplatePaths) > 0 {
Expand All @@ -131,6 +133,27 @@ func main() {
}
}

// isDebugMode checks if debug mode is enabled via any of the supported debug
// environment variables.
func isDebugMode() bool {
debugEnvVars := []string{
"DEBUG",
"ACTIONS_RUNNER_DEBUG", // GitHub Actions runner debug
// Add more debug environment variables here as needed
}

truthyValues := []string{"true", "1", "yes", "on", "enabled"}

for _, envVar := range debugEnvVars {
envValue := strings.ToLower(strings.TrimSpace(os.Getenv(envVar)))
if slices.Contains(truthyValues, envValue) {
return true
}
}

return false
}

// execute a testcase with retry and consider best of N
// intended for flaky tests like interactsh
func executeWithRetry(testCase testutils.TestCase, templatePath string, retryCount int) (string, error) {
Expand Down
12 changes: 12 additions & 0 deletions cmd/integration-test/javascript.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var jsTestcases = []TestCaseInfo{
{Path: "protocols/javascript/net-https.yaml", TestCase: &javascriptNetHttps{}},
{Path: "protocols/javascript/oracle-auth-test.yaml", TestCase: &javascriptOracleAuthTest{}, DisableOn: func() bool { return osutils.IsWindows() || osutils.IsOSX() }},
{Path: "protocols/javascript/vnc-pass-brute.yaml", TestCase: &javascriptVncPassBrute{}},
{Path: "protocols/javascript/multi-ports.yaml", TestCase: &javascriptMultiPortsSSH{}},
}

var (
Expand Down Expand Up @@ -167,6 +168,17 @@ func (j *javascriptVncPassBrute) Execute(filePath string) error {
return multierr.Combine(errs...)
}

type javascriptMultiPortsSSH struct{}

func (j *javascriptMultiPortsSSH) Execute(filePath string) error {
// use scanme.sh as target to ensure we match on the 2nd default port 22
results, err := testutils.RunNucleiTemplateAndGetResults(filePath, "scanme.sh", debug)
if err != nil {
return err
}
return expectResultsCount(results, 1)
}

// purge any given resource if it is not nil
func purge(resource *dockertest.Resource) {
if resource != nil && pool != nil {
Expand Down
2 changes: 2 additions & 0 deletions cmd/integration-test/library.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/logrusorgru/aurora"
"github.com/pkg/errors"
"github.com/projectdiscovery/goflags"
"github.com/projectdiscovery/gologger"
"github.com/projectdiscovery/nuclei/v3/pkg/catalog/config"
"github.com/projectdiscovery/nuclei/v3/pkg/catalog/disk"
"github.com/projectdiscovery/nuclei/v3/pkg/catalog/loader"
Expand Down Expand Up @@ -70,6 +71,7 @@ func executeNucleiAsLibrary(templatePath, templateURL string) ([]string, error)

defaultOpts := types.DefaultOptions()
defaultOpts.ExecutionId = "test"
defaultOpts.Logger = gologger.DefaultLogger

mockProgress := &testutils.MockProgressClient{}
reportingClient, err := reporting.New(&reporting.Options{ExecutionId: defaultOpts.ExecutionId}, "", false)
Expand Down
7 changes: 5 additions & 2 deletions cmd/nuclei/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,11 @@ func main() {
})
}

// Setup graceful exits
// Setup filename for graceful exits
resumeFileName := types.DefaultResumeFilePath()
if options.Resume == "" {
resumeFileName = options.Resume
}
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
go func() {
Expand Down Expand Up @@ -255,7 +258,7 @@ on extensive configurability, massive extensibility and ease of use.`)
flagSet.StringSliceVarP(&options.Targets, "target", "u", nil, "target URLs/hosts to scan", goflags.CommaSeparatedStringSliceOptions),
flagSet.StringVarP(&options.TargetsFilePath, "list", "l", "", "path to file containing a list of target URLs/hosts to scan (one per line)"),
flagSet.StringSliceVarP(&options.ExcludeTargets, "exclude-hosts", "eh", nil, "hosts to exclude to scan from the input list (ip, cidr, hostname)", goflags.FileCommaSeparatedStringSliceOptions),
flagSet.StringVar(&options.Resume, "resume", "", "resume scan using resume.cfg (clustering will be disabled)"),
flagSet.StringVar(&options.Resume, "resume", "", "resume scan from and save to specified file (clustering will be disabled)"),
flagSet.BoolVarP(&options.ScanAllIPs, "scan-all-ips", "sa", false, "scan all the IP's associated with dns record"),
flagSet.StringSliceVarP(&options.IPVersion, "ip-version", "iv", nil, "IP version to scan of hostname (4,6) - (default 4)", goflags.CommaSeparatedStringSliceOptions),
)
Expand Down
Loading
Loading