Commit Graph

711 Commits

Author SHA1 Message Date
Doğan Can Bakır
80321bce4c add variable support to extractors 2025-11-25 12:38:08 +09:00
ledigang
29977358d7 chore: omit unnecessary reassignment (#6622)
Signed-off-by: ledigang <shuangcui@msn.com>
2025-11-24 19:01:30 +07:00
Dogan Can Bakir
528caa8831 Merge pull request #6542 from roiswd/feat-openapi-direct-fuzzing
feat(openapi/swagger): direct fuzzing using target url
2025-11-23 23:35:30 +09:00
Dogan Can Bakir
c32cff8521 Merge pull request #6493 from projectdiscovery/dwisiswant0/fix/restore-parallel-processing-in-workflow-file-proto
fix: restore parallel processing in file proto
2025-11-23 23:34:35 +09:00
Dwi Siswanto
d5d8d50ab7 fix(interactsh): skip DNS lookups on interactsh domains (#6614)
* fix(interactsh): skip DNS lookups on interactsh domains

to prevent false positives.

Prevents nuclei from resolving interactsh domains
injected in Host headers, which would cause
self-interactions to be incorrectly reported as
matches.

Changes:
* Add `GetHostname()` method to `interactsh.Client`
  to expose active server domain.
* Skip CNAME DNS lookups in
  `(*http.Request).addCNameIfAvailable` when
  hostname matches the
  `(*interactsh.Client).GetHostname`.

Fixes #6613

Signed-off-by: Dwi Siswanto <git@dw1.io>

* fix(http): prevent false `interactshDomain` matches

Signed-off-by: Dwi Siswanto <git@dw1.io>

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-11-21 21:11:59 +05:30
Dwi Siswanto
ad1e6f8d75 feat(variables): check for undefined params for lazy eval (#6618)
* feat(variables): check for undefined params for lazy eval

Signed-off-by: Dwi Siswanto <git@dw1.io>

* test(variables): add TestCheckForLazyEval

Signed-off-by: Dwi Siswanto <git@dw1.io>

* fix(variables): fail safe on err compile expr

Signed-off-by: Dwi Siswanto <git@dw1.io>

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-11-21 12:53:58 +07:00
Mzack9999
4e8843a7cd Merge branch 'dev' into multiport-js 2025-11-18 22:24:21 +04:00
Mzack9999
c746a8fdae lint 2025-11-18 22:20:17 +04:00
Mzack9999
9b37f1b441 adding test case 2025-11-18 21:43:28 +04:00
PDTeamX
8016d15fdc Remove genproto replace directives from go.mod 2025-11-14 23:23:50 +05:30
Deamhan
488d5886ea fix(charts): fixed out of bounds read (#6607) 2025-11-14 17:16:39 +05:30
Doğan Can Bakır
cf5557e0fd bump version 2025-11-12 13:57:11 +09:00
Mzack9999
aecef0ab75 Merge branch 'dev' into feat-gozero-virtual 2025-11-08 06:01:01 +04:00
Mzack9999
0dde27f41d Merge pull request #6588 from projectdiscovery/6491_add_nuclei_template_dir_env_variable
add env variable for nuclei tempaltes dir
2025-11-08 05:52:44 +04:00
Doğan Can Bakır
90d51f733a add env variable for nuclei tempaltes dir 2025-11-05 18:15:57 +03:00
Dwi Siswanto
d7da0e0914 fix(http): resolve timeout config issues (#6562)
across multiple layers

Fixes timeout configuration conflicts where HTTP
requests would timeout prematurely despite
configured values in `@timeout` annotations or
`-timeout` flags.

RCA:
* `retryablehttp` pkg overriding with default
  30s timeout.
* Custom timeouts not propagating to
  `retryablehttp` layer.
* Multiple timeout layers not sync properly.

Changes:
* Propagate custom timeouts from `@timeout`
  annotations to `retryablehttp` layer.
* Adjust 5-minute maximum cap to prevent DoS via
  extremely large timeouts.
* Ensure `retryableHttpOptions.Timeout` respects
  `ResponseHeaderTimeout`.
* Add comprehensive tests for timeout capping
  behavior.

This allows templates to override global timeout
via `@timeout` annotations while preventing abuse
thru unreasonably large timeout values.

Fixes #6560.

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-11-04 08:51:17 +07:00
Dwi Siswanto
7e33712d08 fix(templates): mem leaks in parser cache
Fixes duplicate template storage & removes
unnecessary raw bytes caching.

Mem usage reduced by ~30%.
> 423MB => 299MB heap alloc.

* Use `StoreWithoutRaw()` to avoid storing raw
  bytes.
* Remove duplicate storage in both caches.
* Remove ineffective raw bytes retrieval logic.

Benchmarks show 45% perf improvement with no
regressions.

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-11-03 20:27:03 +07:00
Dwi Siswanto
fb93cbeeda test(core): rm unused tests
Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-11-02 21:44:06 +07:00
Dwi Siswanto
69c831bad2 refactor(core): keep workflow exec seq
Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-11-02 21:35:28 +07:00
Dwi Siswanto
f544ea706c Revert "introducing workflow sequential mode"
This reverts commit 1093bbc62d.
2025-11-02 21:24:40 +07:00
Mzack9999
1093bbc62d introducing workflow sequential mode 2025-11-02 21:24:29 +07:00
Dwi Siswanto
133e8b98c0 fix(core): race cond in workflow execution
caused by shared context callbacks.

it was exposed after adding concurrent exec to
workflow processing and occurred when multiple
goroutines attempted to write to the same
`ctx.OnResult` callback field simultaneously,
causing data races during workflow template exec.

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-11-02 21:24:28 +07:00
Dwi Siswanto
e60f4158ea chore(file): satisfy lints
Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-11-02 21:24:27 +07:00
Dwi Siswanto
984deac200 test: adds Test(FileProtocol|Workflows)ConcurrentExecution tests
Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-11-02 21:24:27 +07:00
Dwi Siswanto
17360cb6e4 fix: restore parallel processing in workflow & file proto
add missing `go` keyword to anonymous funcs that
were intended to run as goroutines but were
executing synchronously instead.

Fixes #6492

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-11-02 21:24:26 +07:00
Dwi Siswanto
770f20eeab feat(templates): add file metadata fields to parsedTemplate (#6534)
* feat(templates): add file metadata fields to `parsedTemplate`

to track template file information for cache
validation purposes.

closes #6515.

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(templates): satisfy lints

Signed-off-by: Dwi Siswanto <git@dw1.io>

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-11-02 19:09:03 +07:00
Mzack9999
5b5d87f62a Merge pull request #6508 from chovanecadam/ssh-keyboard-interactive
SSH keyboard-interactive
2025-11-02 16:05:51 +04:00
Dwi Siswanto
7fc4752a95 chore(js): migrate github.com/go-pg/pg => github.com/go-pg/pg/v10
Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-11-02 01:12:11 +07:00
Dwi Siswanto
248bac75a0 feat(js): enhance SSH keyboard interactive auth
by:
* implement regex-based prompt matching for
  password variants.
* add support for filling username prompts in
  keyboard interactive challenges.
* improve debug logging with structured output.

this addresses issues with servers using
non-standard prompt formats and provides better
visibility into auth failures.

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-11-02 00:38:37 +07:00
Adam Chovanec
6794b9cba0 fix: add logging 2025-11-02 00:38:37 +07:00
Adam Chovanec
8136d4f368 fix: provide answer only when asked for 2025-11-02 00:38:36 +07:00
Adam Chovanec
1a8124679e feat: best-effort keyboard-interactive support for SSH 2025-11-02 00:38:35 +07:00
Deamhan
f3181b9a2a fix(headless): fixed memory leak issue during page initialization (#6569)
* fix(headless): fixed memory leak issue during page initialization

* fix(headless): typo fix and added comment

* fix(headless): one more typo fix
2025-11-02 00:33:25 +07:00
Dwi Siswanto
dd8946d3f2 chore: satisfy lints
Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-10-30 09:41:01 +07:00
Mzack9999
c814128ee2 removing debug log 2025-10-29 19:54:51 +04:00
Mzack9999
6f59472f78 reusing dialer 2025-10-29 19:03:59 +04:00
Mzack9999
e535e0126f adding tests 2025-10-28 14:19:12 +04:00
Mzack9999
9d59fd0188 adding xpath + json extractors 2025-10-28 14:19:06 +04:00
Mzack9999
3384606dea adding support for execution in docker 2025-10-25 00:31:03 +04:00
Dwi Siswanto
d2ae3521cc refactor(disk): templates catalog (#5914)
* refactor(disk): templates catalog

Signed-off-by: Dwi Siswanto <git@dw1.io>

* feat(disk): drying err

Signed-off-by: Dwi Siswanto <git@dw1.io>

* feat(disk): simplify `DiskCatalog.OpenFile` method

since `BackwardsCompatiblePaths` func is already
deprecated.

Signed-off-by: Dwi Siswanto <git@dw1.io>

* test: update functional test cases

Signed-off-by: Dwi Siswanto <git@dw1.io>

* feat: reuse error

Signed-off-by: Dwi Siswanto <git@dw1.io>

* fix(disk): handle glob errors consistently

Signed-off-by: Dwi Siswanto <git@dw1.io>

* fix(disk): use forward slashes for fs.FS path ops

to fix Windows compat.

The io/fs package requires forward slashes ("/")
as path separators regardless of the OS. Using
[filepath.Separator] or [os.PathSeparator] breaks
[fs.Open] and [fs.Glob] ops on Windows where the
separator is backslash ("\").

Signed-off-by: Dwi Siswanto <git@dw1.io>

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-10-24 07:31:35 +07:00
Ice3man
f3298323f3 fix: populate req_url_pattern before event creation (#6547) 2025-10-24 03:06:12 +05:30
Dogan Can Bakir
ae52ef04c9 Merge pull request #6545 from projectdiscovery/bugfix-6329-clientpool
clean up pools after 24hours inactivity
2025-10-22 22:41:20 +03:00
Mzack9999
b9ce0c2226 fixing syntax 2025-10-22 19:11:26 +04:00
tvroi
e168f8dbfa fix(openapi/swagger): remove code duplication 2025-10-21 20:27:33 +07:00
tvroi
f57bd8c8ee fix(openapi/swagger): linter and url validation 2025-10-21 20:16:05 +07:00
Mzack9999
5557f4eae3 fixing lint 2025-10-21 16:57:26 +04:00
Mzack9999
f6efa9da6c clean up pools after 24hours inactivity 2025-10-21 16:41:26 +04:00
Mzack9999
5b7b83618c fixing failing integration tests 2025-10-21 14:29:15 +04:00
tvroi
89cfb75bb6 fix(openapi/swagger): remove discarded error in defer 2025-10-20 18:56:47 +07:00
tvroi
f0429aa4b7 fix(openapi/swagger): err shadowing on write failure 2025-10-20 18:49:06 +07:00