2287 Commits
Author SHA1 Message Date
Dogan Can Bakir 7d90382979 Merge pull request #1965 from projectdiscovery/dwisiswant0/build/publish-docker-images-with-goreleaser
build: publish Docker images with GoReleaser
2026-10-08 09:59:32 +03:00
Dogan Can Bakir 31564a28b0 Merge pull request #1966 from projectdiscovery/dependabot/go_modules/dev/modules-3978e7a9d0
chore(deps): bump the modules group with 5 updates
2026-10-08 09:59:05 +03:00
dependabot[bot] 838d175e01 chore(deps): bump the modules group with 5 updates
Bumps the modules group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [github.com/projectdiscovery/ratelimit](https://github.com/projectdiscovery/ratelimit) | `0.0.90` | `0.0.92` |
| [github.com/projectdiscovery/retryablehttp-go](https://github.com/projectdiscovery/retryablehttp-go) | `1.3.27` | `1.3.29` |
| [github.com/projectdiscovery/utils](https://github.com/projectdiscovery/utils) | `0.11.3` | `0.11.6` |
| [github.com/projectdiscovery/fastdialer](https://github.com/projectdiscovery/fastdialer) | `0.5.20` | `0.5.22` |
| [github.com/projectdiscovery/networkpolicy](https://github.com/projectdiscovery/networkpolicy) | `0.1.50` | `0.1.52` |


Updates `github.com/projectdiscovery/ratelimit` from 0.0.90 to 0.0.92
- [Release notes](https://github.com/projectdiscovery/ratelimit/releases)
- [Commits](https://github.com/projectdiscovery/ratelimit/compare/v0.0.90...v0.0.92)

Updates `github.com/projectdiscovery/retryablehttp-go` from 1.3.27 to 1.3.29
- [Release notes](https://github.com/projectdiscovery/retryablehttp-go/releases)
- [Commits](https://github.com/projectdiscovery/retryablehttp-go/compare/v1.3.27...v1.3.29)

Updates `github.com/projectdiscovery/utils` from 0.11.3 to 0.11.6
- [Release notes](https://github.com/projectdiscovery/utils/releases)
- [Changelog](https://github.com/projectdiscovery/utils/blob/main/CHANGELOG.md)
- [Commits](https://github.com/projectdiscovery/utils/compare/v0.11.3...v0.11.6)

Updates `github.com/projectdiscovery/fastdialer` from 0.5.20 to 0.5.22
- [Release notes](https://github.com/projectdiscovery/fastdialer/releases)
- [Commits](https://github.com/projectdiscovery/fastdialer/compare/v0.5.20...v0.5.22)

Updates `github.com/projectdiscovery/networkpolicy` from 0.1.50 to 0.1.52
- [Release notes](https://github.com/projectdiscovery/networkpolicy/releases)
- [Commits](https://github.com/projectdiscovery/networkpolicy/compare/v0.1.50...v0.1.52)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/ratelimit
  dependency-version: 0.0.92
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/retryablehttp-go
  dependency-version: 1.3.29
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/utils
  dependency-version: 0.11.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/fastdialer
  dependency-version: 0.5.22
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/networkpolicy
  dependency-version: 0.1.52
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-10-07 14:22:49 +00:00
Dwi Siswanto b773ce416a build: publish Docker images with GoReleaser
Build and push the Docker image in the release workflow, and remove the
separate Docker Hub workflow that rebuilt the image after
"🎉 Release Binary" finished.

GoReleaser now builds the image with dockers_v2 from the binaries it
compiles in the same run. The Dockerfile no longer builds subfinder. It
copies $TARGETPLATFORM/subfinder from the GoReleaser build context and
sets OCI labels. dockers_v2 replaces the deprecated dockers and
docker_manifests.

Rename release-binary.yml to release.yml and the workflow to
"🎉 Release", since it now publishes images too. The workflow now logs in
to Docker Hub before projectdiscovery/actions/goreleaser runs. With
release: true, that action already sets up QEMU and Buildx.

Tag images with the release tag, vX.Y, vX and latest. The old workflow
pushed only the release tag and latest.

Disable image builds for snapshot runs in CI, where runners may lack
QEMU. Local snapshot runs still build images.

Removing the old workflow also removes its workflow_dispatch trigger, so
images can no longer be re-pushed without a release run.

Build the 32-bit ARM image for linux/arm/v6 instead of linux/arm.
GoReleaser stores the default GOARM=6 binary under linux/arm/v6, but
buildx resolves linux/arm to arm/v7, where there is no binary. armv7
hosts can still run the arm/v6 image.

Closes #1964

Signed-off-by: Dwi Siswanto <[email protected]>
2026-10-07 20:35:22 +07:00
Doğan Can Bakır bc47c52bf5 bump version 2026-10-06 22:11:46 +03:00
Dogan Can Bakir 3700637ca5 Merge pull request #1865 from g147/dev
added subdomain center
2026-10-06 22:07:38 +03:00
Doğan Can Bakır cf55e34ed4 fix(subdomaincenter): isolate state per run 2026-10-06 21:58:47 +03:00
Doğan Can Bakır e12ca4922b Merge remote-tracking branch 'origin/dev' into feat/subdomaincenter
# Conflicts:
#	pkg/passive/sources.go
2026-10-06 21:58:43 +03:00
Dogan Can Bakir 1ecdb83e79 Merge pull request #1956 from root-Manas/feat/regex-result-filters
feat(runner): add regular expression result filters
2026-10-06 21:56:15 +03:00
Doğan Can Bakır dcc066aa48 refactor(runner): keep compiled filters on runner, accept regex files 2026-10-06 21:42:42 +03:00
Doğan Can Bakır aabab03235 Merge remote-tracking branch 'origin/dev' into feat/1955-regex-filters 2026-10-06 21:39:23 +03:00
Dogan Can Bakir 180db5cf08 Merge pull request #1957 from CalvinTjoaquinn/fix/release-response-bodies
fix(sources): release the response body, and bound the github 403 retry
2026-10-06 21:25:23 +03:00
Dogan Can Bakir e850539092 Merge pull request #1863 from krishna28238-arch/fix-normalize-source-subdomains
fix: normalize source-reported subdomains before domain check
2026-10-06 21:14:20 +03:00
Dogan Can Bakir 339e7f8adf Merge pull request #1946 from projectdiscovery/dependabot/go_modules/dev/modules-aaf3e947bf
chore(deps): bump the modules group across 1 directory with 7 updates
2026-10-05 15:53:22 +03:00
Calvin Tjoaquinn 107c3f25e8 fix(github): bound the rate-limit retry per URL, and close on drain error
Two problems the review found in the previous commit.

`rateLimitRetries` lived on the run, so a 403 on a page that then
succeeded still spent budget. With one exhausted token and one healthy
one in the pool, every page answers 403 once and 200 once, and the
third such page ran the counter past the pool size: enumeration ended
early and reported that every token was rate limited while a working
token was still in the pool. The budget is now a `retries` argument
that a new URL starts over at zero, so a page that succeeds cannot eat
into the budget of the pages after it.

`DiscardHTTPResponse` returned before `Close()` when draining failed,
leaking the connection in exactly the case the helper exists to handle,
and every source now reaches it through a defer. It closes in both
paths.

Both tests fail without their fix: the retry one reports page 3 being
requested once rather than twice, the discard one reports the body
never being closed.
2026-10-01 08:20:28 +07:00
Calvin Tjoaquinn bae98a62a2 fix(sources): release the response body, and bound the github 403 retry
httpRequestWrapper returns the response *and* an error for any non-200
status, so a source that returns on `err != nil` before registering its
defer leaves that body undrained. Seven sources did:

  certspotter, digitalyama, driftnet, leakix, merklemap, reconeer,
  securitytrails

For a key-based source this is the common path, not a rare one: 429 once a
free-tier key is exhausted, 403 once it is rejected. Moving the deferred
DiscardHTTPResponse above the error check fixes it, and the helper already
ignores a nil response. securitytrails is different in shape: its 403 retry
overwrote resp without draining the first reply. digitalyama closed its body
without draining, so the connection could not be reused either.

The new sweep also uncovered a crash. github recursed into enumerate on every
403 with X-Ratelimit-Remaining 0, and Tokens.Get hands the pool out round
robin without skipping the tokens already marked exceeded. Once every token is
limited there was nothing to stop the recursion: one stack frame per 403 until
the process died with a stack overflow, which is what the test hit before this
change. Each token now gets one attempt, then the run reports the rate limit
and ends.

TestSourcesCloseResponseBodyOnErrorStatus runs every source against a 429 and
a 403 and requires every body handed out to be closed, so a source added later
cannot quietly reintroduce this.
2026-09-29 13:38:34 +07:00
root-Manas 048692348f fix(runner): isolate compiled filters per runner 2026-09-27 18:31:24 +05:30
root-Manas 6d2d8b9eda fix(runner): preserve filters on failed regex compilation 2026-09-27 11:02:07 +05:30
root-Manas bccaf2a47e feat(runner): add regular expression result filters 2026-09-27 10:45:36 +05:30
dependabot[bot] 10e609ce8e chore(deps): bump the modules group across 1 directory with 7 updates
Bumps the modules group with 7 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [github.com/projectdiscovery/gologger](https://github.com/projectdiscovery/gologger) | `1.1.72` | `1.1.73` |
| [github.com/projectdiscovery/ratelimit](https://github.com/projectdiscovery/ratelimit) | `0.0.88` | `0.0.90` |
| [github.com/projectdiscovery/retryablehttp-go](https://github.com/projectdiscovery/retryablehttp-go) | `1.3.24` | `1.3.27` |
| [github.com/projectdiscovery/utils](https://github.com/projectdiscovery/utils) | `0.11.2` | `0.11.3` |
| [github.com/projectdiscovery/cdncheck](https://github.com/projectdiscovery/cdncheck) | `1.3.0` | `1.3.1` |
| [github.com/projectdiscovery/fastdialer](https://github.com/projectdiscovery/fastdialer) | `0.5.18` | `0.5.20` |
| [github.com/projectdiscovery/networkpolicy](https://github.com/projectdiscovery/networkpolicy) | `0.1.48` | `0.1.50` |



Updates `github.com/projectdiscovery/gologger` from 1.1.72 to 1.1.73
- [Release notes](https://github.com/projectdiscovery/gologger/releases)
- [Commits](https://github.com/projectdiscovery/gologger/compare/v1.1.72...v1.1.73)

Updates `github.com/projectdiscovery/ratelimit` from 0.0.88 to 0.0.90
- [Release notes](https://github.com/projectdiscovery/ratelimit/releases)
- [Commits](https://github.com/projectdiscovery/ratelimit/compare/v0.0.88...v0.0.90)

Updates `github.com/projectdiscovery/retryablehttp-go` from 1.3.24 to 1.3.27
- [Release notes](https://github.com/projectdiscovery/retryablehttp-go/releases)
- [Commits](https://github.com/projectdiscovery/retryablehttp-go/compare/v1.3.24...v1.3.27)

Updates `github.com/projectdiscovery/utils` from 0.11.2 to 0.11.3
- [Release notes](https://github.com/projectdiscovery/utils/releases)
- [Changelog](https://github.com/projectdiscovery/utils/blob/main/CHANGELOG.md)
- [Commits](https://github.com/projectdiscovery/utils/compare/v0.11.2...v0.11.3)

Updates `github.com/projectdiscovery/cdncheck` from 1.3.0 to 1.3.1
- [Release notes](https://github.com/projectdiscovery/cdncheck/releases)
- [Commits](https://github.com/projectdiscovery/cdncheck/compare/v1.3.0...v1.3.1)

Updates `github.com/projectdiscovery/fastdialer` from 0.5.18 to 0.5.20
- [Release notes](https://github.com/projectdiscovery/fastdialer/releases)
- [Commits](https://github.com/projectdiscovery/fastdialer/compare/v0.5.18...v0.5.20)

Updates `github.com/projectdiscovery/networkpolicy` from 0.1.48 to 0.1.50
- [Release notes](https://github.com/projectdiscovery/networkpolicy/releases)
- [Commits](https://github.com/projectdiscovery/networkpolicy/compare/v0.1.48...v0.1.50)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/cdncheck
  dependency-version: 1.3.1
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/fastdialer
  dependency-version: 0.5.20
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/gologger
  dependency-version: 1.1.73
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/networkpolicy
  dependency-version: 0.1.49
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/ratelimit
  dependency-version: 0.0.89
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/retryablehttp-go
  dependency-version: 1.3.26
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/utils
  dependency-version: 0.11.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: modules
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-09-25 04:17:58 +00:00
dw1 4debdd5fdb refactor(sources): isolate state for concurrent source runs (#1953)
* chore: go mod tidy

Signed-off-by: Dwi Siswanto <[email protected]>

* refactor(sources): isolate state for concurrent source runs

Keep counters and skipped state local to each Run call so overlapping
runs cannot reset each other's accounting or consume each other's result
limits. Protect statistics publication and reads with a mutex, returning
a snapshot of the most recently completed run.

Snapshot API keys at the start of each run and copy supplied key slices
in AddApiKeys. Keep atomic counters scoped to one run for the GitHub,
GitLab, and Driftnet workers.

Move GitLab's deferred wg.Done call before the worker's error paths so
failed file requests do not leave enumeration blocked.

Fixes #1952
Closes #1947

Signed-off-by: Dwi Siswanto <[email protected]>

---------

Signed-off-by: Dwi Siswanto <[email protected]>
2026-09-25 11:15:23 +07:00
dw1andMzack9999 cb8efa3faa fix(scanmalware): statistics races between concurrent runs (#1949)
* fix(scanmalware): statistics races between concurrent runs

Concurrent Run calls reset and update counters on the same Source,
causing data races and mixing statistics from separate enumerations.
Statistics also reads those fields without synchronization.

Keep counters local to each run and publish the completed statistics
under a mutex before closing the results channel. Statistics returns
a snapshot of the most recently completed run. Requests remain
concurrent.

Fixes #1948

Signed-off-by: Dwi Siswanto <[email protected]>

* skip submd

* relax timing

---------

Signed-off-by: Dwi Siswanto <[email protected]>
Co-authored-by: Mzack9999 <[email protected]>
2026-09-23 18:58:37 +07:00
Dogan Can Bakir 20d140af05 Merge pull request #1838 from melvinsh/feat/add-crtname
feat: add crtname passive source
2026-09-16 14:46:00 +03:00
Doğan Can Bakır 5156637b4a fix(crtname): lint errors and response body cleanup 2026-09-16 14:33:58 +03:00
Doğan Can Bakır bfa7890c73 Merge remote-tracking branch 'origin/dev' into feat/add-crtname
# Conflicts:
#	pkg/passive/sources.go
2026-09-16 14:33:58 +03:00
dw1andMzack9999 eba9c51eaf fix(zoomeyeapi): switch to the v2 search API (#1944)
* fix(zoomeyeapi): switch to the v2 search API

Replace GET /domain/search with POST /v2/search, using a base64-encoded
domain query and reading data[].domain. Select web assets explicitly
and preserve the existing host:key configuration.

Stop pagination at the reported total or an empty page. Report HTTP
403 and API errors, close responses before sending errors, and make
error delivery cancelable.

Fixes #1943

Signed-off-by: Dwi Siswanto <[email protected]>

* add tests

---------

Signed-off-by: Dwi Siswanto <[email protected]>
Co-authored-by: Mzack9999 <[email protected]>
2026-09-15 18:38:46 +07:00
Mzack9999 02e5aef299 Merge pull request #1942 from projectdiscovery/dwisiswant0/chore/deps/bump-golang-org-x-net-v0-59-0-text-v0-42-0
chore(deps): bump golang.org/x/{[email protected].0,[email protected].0}
2026-09-14 15:27:41 +02:00
Mzack9999 6cabb7c684 update readme 2026-09-14 15:23:52 +02:00
Dwi Siswanto c1ffc397b0 chore(deps): bump golang.org/x/{[email protected],[email protected]}
Fixes #1941

Signed-off-by: Dwi Siswanto <[email protected]>
2026-09-14 09:34:59 +07:00
Dogan Can Bakir 984c070e28 Merge pull request #1880 from projectdiscovery/dependabot/go_modules/dev/modules-7cbcde8dbf
chore(deps): bump the modules group across 1 directory with 9 updates
2026-09-11 14:47:11 +03:00
Mzack9999 0239836d90 Merge pull request #1873 from projectdiscovery/dwisiswant0/chore/subscraping/restore-HTTP-connection-reuse
chore(subscraping): restore HTTP connection reuse
2026-09-09 23:28:41 +02:00
Mzack9999 89b62c0aec Merge pull request #1870 from projectdiscovery/dwisiswant0/feat/add-bounded-concurrent-domain-enumeration
feat: add bounded concurrent domain enumeration
2026-09-09 23:16:12 +02:00
dependabot[bot] 81487cff30 chore(deps): bump the modules group across 1 directory with 9 updates
Bumps the modules group with 3 updates in the / directory: [github.com/projectdiscovery/dnsx](https://github.com/projectdiscovery/dnsx), [github.com/projectdiscovery/cdncheck](https://github.com/projectdiscovery/cdncheck) and [github.com/projectdiscovery/goflags](https://github.com/projectdiscovery/goflags).


Updates `github.com/projectdiscovery/dnsx` from 1.3.0 to 1.3.1
- [Release notes](https://github.com/projectdiscovery/dnsx/releases)
- [Commits](https://github.com/projectdiscovery/dnsx/compare/v1.3.0...v1.3.1)

Updates `github.com/projectdiscovery/utils` from 0.11.1 to 0.11.2
- [Release notes](https://github.com/projectdiscovery/utils/releases)
- [Changelog](https://github.com/projectdiscovery/utils/blob/main/CHANGELOG.md)
- [Commits](https://github.com/projectdiscovery/utils/compare/v0.11.1...v0.11.2)

Updates `github.com/projectdiscovery/cdncheck` from 1.2.50 to 1.3.0
- [Release notes](https://github.com/projectdiscovery/cdncheck/releases)
- [Commits](https://github.com/projectdiscovery/cdncheck/compare/v1.2.50...v1.3.0)

Updates `github.com/projectdiscovery/fastdialer` from 0.5.17 to 0.5.18
- [Release notes](https://github.com/projectdiscovery/fastdialer/releases)
- [Commits](https://github.com/projectdiscovery/fastdialer/compare/v0.5.17...v0.5.18)

Updates `github.com/projectdiscovery/hmap` from 0.0.101 to 0.0.102
- [Release notes](https://github.com/projectdiscovery/hmap/releases)
- [Commits](https://github.com/projectdiscovery/hmap/compare/v0.0.101...v0.0.102)

Updates `github.com/projectdiscovery/networkpolicy` from 0.1.46 to 0.1.48
- [Release notes](https://github.com/projectdiscovery/networkpolicy/releases)
- [Commits](https://github.com/projectdiscovery/networkpolicy/compare/v0.1.46...v0.1.48)

Updates `github.com/projectdiscovery/retryablehttp-go` from 1.3.23 to 1.3.24
- [Release notes](https://github.com/projectdiscovery/retryablehttp-go/releases)
- [Commits](https://github.com/projectdiscovery/retryablehttp-go/compare/v1.3.23...v1.3.24)

Updates `github.com/projectdiscovery/goflags` from 0.1.76 to 0.2.1
- [Release notes](https://github.com/projectdiscovery/goflags/releases)
- [Commits](https://github.com/projectdiscovery/goflags/compare/v0.1.76...v0.2.1)

Updates `github.com/projectdiscovery/retryabledns` from 1.0.115 to 1.0.116
- [Release notes](https://github.com/projectdiscovery/retryabledns/releases)
- [Commits](https://github.com/projectdiscovery/retryabledns/compare/v1.0.115...v1.0.116)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/dnsx
  dependency-version: 1.3.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/utils
  dependency-version: 0.11.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/cdncheck
  dependency-version: 1.3.0
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/fastdialer
  dependency-version: 0.5.18
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/hmap
  dependency-version: 0.0.102
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/networkpolicy
  dependency-version: 0.1.48
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/retryablehttp-go
  dependency-version: 1.3.24
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/goflags
  dependency-version: 0.2.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/retryabledns
  dependency-version: 1.0.116
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-09-09 14:22:57 +00:00
Dwi Siswanto 0c457c2917 chore(subscraping): restore HTTP connection reuse
Drop the default Connection: close header so follow-up requests to the
same host can reuse a session's connection pool. That skips repeating
TCP setup and TLS handshakes on paginated sources. Explicit Connection
headers from sources still win.

The header landed in b03f0933d1 to stop descriptor exhaustion from
bound how long idle conns stick around. Existing Session.Close cleanup
still drains the pool when enumeration finishes.

Add HTTP and HTTPS regression tests for reuse, explicit close overrides,
and session cleanup. Add a Linux subprocess test that enumerates 128
domains under a 64-descriptor cap, makes two requests per domain, and
checks that each pair shares one connection. Disable enumeration's
session cleanup via a test overlay and the same test dies on the 30th
domain with "too many open files".

Add a benchmark for successive session requests, including connection
counts and allocations. Median of five runs of 500 requests against a
local server:

                         before       after
    HTTP ns/op           197234       82625
    HTTPS ns/op         2871946       88933
    HTTP allocs/op          145          80
    HTTPS allocs/op         929          85
    connections/run         500           1

These numbers are local repeated requests, not full enumeration
throughput.

Signed-off-by: Dwi Siswanto <[email protected]>
2026-09-09 10:14:43 +07:00
dw1andcoderabbitai[bot] 357385b8e4 Update pkg/runner/runner.go
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-09-09 09:48:14 +07:00
Dwi Siswanto 6d1b124dbd feat: add bounded concurrent domain enumeration
Process domain lists with a worker pool bounded by Options.Threads.
Sources already run concurrently within each domain, but the runner
used to wait for every source to finish before starting the next one.
Reuse -t so those waits can overlap instead of adding another flag.
Default stays at 10; -t 1 keeps the old sequential domain behavior.

Create a fresh built-in source instance per domain. Snapshot source
selection plus provider-file and environment keys when the runner is
constructed, and keep environment-key precedence. That way mutable
source state and stats stay isolated across concurrent enumerations.

Preserve registered custom sources and overrides. Serialize their runs
by source name, drain results on cancel, and capture stats before
releasing the source. Custom sources without explicit keys keep the
registered instance's shared config. Leave the legacy passive
constructor and provider-loading API in place.

Share provider budgets across the whole batch instead of handing every
domain a fresh request burst. Built-in sources get cancellable
fixed-window waits, with no background timers for unlimited entries.
Keep per-source overrides of the global rate setting. Custom sources
share one legacy limiter so direct Session.MultiRateLimiter users still
work, including the existing blocking wait. Sessions borrow shared
budgets and do not stop them when a domain finishes.

Apply -t to the aggregate active DNS workload, including wildcard
probes. Reserve shared capacity before spinning up resolution task
goroutines so we don't create Threads workers for every concurrent
domain. Watch cancellation while waiting for capacity, receiving tasks,
and sending results. Keep wildcard state local to each domain and wait
for passive result processing before merging wildcard metadata.

Serialize callbacks and complete-domain output writes. Validate output
paths before any provider work starts, open shared output once on the
first accepted domain, and serialize file creation for repeated domain
paths. Leave output alone when input is empty. Return scanner errors,
preserve write and close errors, and cancel pending work on the first
failure. Domain output order is unspecified.

Reject nonpositive CLI thread counts, but keep a one-worker fallback
for SDK callers that leave Threads unset. Document the expanded -t
behavior and the built-in vs custom-source config boundaries.

Add a benchmark before touching the scheduler, plus regression tests
for concurrency bounds, cancellation, shared budgets, source and
credential isolation, custom-source compatibility, DNS worker growth,
callbacks, output files, and input errors.

For 40 domains with a simulated 5 ms source wait, median batch times
over five runs on Go 1.26.5 linux/amd64 were:

    Threads       Before       After
          1     225.35 ms    219.20 ms
          4     225.22 ms     55.43 ms
         10     227.32 ms     22.63 ms

All domains completed and peak concurrency matched the requested bound.
At Threads=10, allocated bytes went from about 643 KB to 720 KB per
batch. This benchmark only measures scheduling with a mock source; it
does not measure production source construction or live provider
throughput.

Signed-off-by: Dwi Siswanto <[email protected]>
2026-09-09 07:57:25 +07:00
Ayush Singh bbcbf6e849 added subdomain center 2026-09-07 20:30:04 +05:30
krishna28238-arch fc4f14e992 fix: normalize source-reported subdomains before domain gate check 2026-09-06 15:17:58 +00:00
Mzack9999 7a0b91f0fa Merge pull request #1841 from daixiheguu/fix-github-item-processor-name
fix(github): correct processItems helper name
2026-08-31 18:11:57 +04:00
dependabot[bot] 65bd1b3a83 chore(deps): bump golang from 1.25-alpine to 1.27-alpine (#1839)
Bumps golang from 1.25-alpine to 1.27-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.27-alpine
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-27 22:53:06 +04:00
dependabot[bot] 0eacd6eab5 chore(deps): bump the modules group with 3 updates (#1840)
Bumps the modules group with 3 updates: [github.com/projectdiscovery/cdncheck](https://github.com/projectdiscovery/cdncheck), [github.com/projectdiscovery/fastdialer](https://github.com/projectdiscovery/fastdialer) and [github.com/projectdiscovery/networkpolicy](https://github.com/projectdiscovery/networkpolicy).


Updates `github.com/projectdiscovery/cdncheck` from 1.2.49 to 1.2.50
- [Release notes](https://github.com/projectdiscovery/cdncheck/releases)
- [Commits](https://github.com/projectdiscovery/cdncheck/compare/v1.2.49...v1.2.50)

Updates `github.com/projectdiscovery/fastdialer` from 0.5.16 to 0.5.17
- [Release notes](https://github.com/projectdiscovery/fastdialer/releases)
- [Commits](https://github.com/projectdiscovery/fastdialer/compare/v0.5.16...v0.5.17)

Updates `github.com/projectdiscovery/networkpolicy` from 0.1.45 to 0.1.46
- [Release notes](https://github.com/projectdiscovery/networkpolicy/releases)
- [Commits](https://github.com/projectdiscovery/networkpolicy/compare/v0.1.45...v0.1.46)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/cdncheck
  dependency-version: 1.2.50
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/fastdialer
  dependency-version: 0.5.17
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/networkpolicy
  dependency-version: 0.1.46
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-27 22:53:02 +04:00
daixiheguu 56ff3e1327 fix(github): correct processItems helper name
Signed-off-by: daixiheguu <[email protected]>
2026-08-27 23:44:19 +08:00
Melvin Lammerts 3cac8c8428 feat: add crtname passive source
Query crt.name /v1/search for CT-indexed subdomains. Free tier needs no
key; a Bearer token is optional. Not recursive because the API only
accepts eTLD+1.

Closes projectdiscovery/subfinder#1831
2026-08-24 15:39:05 +02:00
PDTeamX 51e9b9065e version bump + make thc non default 2026-08-23 00:14:39 +05:30
5e30e2d208 fix(crtsh): set statement_timeout via SQL query to avoid PgBouncer handshake rejection (#1828) (#1832)
* fix(crtsh): set statement_timeout via SQL query to avoid PgBouncer handshake rejection (#1828)

* fix(crtsh): pin statement_timeout to single sql.Conn connection (#1828)

* fix(crtsh): explicitly discard deferred conn.Close error to satisfy errcheck

---------

Co-authored-by: BountyGrid <[email protected]>
Co-authored-by: Sandeep Singh <[email protected]>
2026-08-23 00:09:17 +05:30
Jonas LejonandSandeep Singh 85fee23c94 feat: add scanmalware passive source (#1834)
* feat: add scanmalware passive source

ScanMalware is a free sandboxed URL scanner with a public archive. The source
needs no API key: the API is anonymous, and a key only raises the rate limit.

Two endpoints are queried and merged. /api/v1/ct/dns/{domain} returns subdomains
observed in Certificate Transparency DNS records and carries most of the answer.
/api/v1/search/smql?q=domain:*.{domain} returns hosts present in the public scan
archive, which is not redundant: a host that was scanned but never held a
certificate appears only there.

The API caps its subdomain list and reports subdomains_truncated when it does;
that is surfaced as an error result rather than silently returning a partial list
as if it were complete.

Requests carry an explicit User-Agent so the traffic is attributable. The session
sets a random browser User-Agent by default, which headers passed to session.Get
override.

* feat(scanmalware): also read browser-observed hosts

Adds a third query, to /api/v1/hosts/{domain}, returning the hosts a browser
resolved and requested while rendering pages on the domain. That is a third
population: dev and staging hosts holding no certificate and never scanned
directly appear only there.

The default source set is used deliberately. The endpoint can also return hosts
named in a page's CSP or extracted statically from script source, but only about
a third of the statically extracted ones were ever contacted, and subfinder has
no way to carry that distinction through to the user.

Truncation is reported per source and surfaced rather than silently returning a
partial list.

* fix(scanmalware): check the error from closing response bodies

golangci-lint errcheck flagged three unchecked resp.Body.Close() calls. Close
errors are now reported as an error result, matching how the other sources
handle them.

* fix(scanmalware): do not skip the other queries when one endpoint fails

The three queries return independent populations, so a failure in the first was
silently skipping the archive and observed-host queries for the whole run. Only
a cancelled context stops the run now; an endpoint error is reported and the
remaining queries still execute.

Reported in review.

* fix(scanmalware): report archive pagination truncation

The archive query stops after a fixed number of pages. When the last allowed
page came back full there were more results than were read, and the source
returned the shortened set without saying so.

The other two queries already report truncation, so this was the one path where
a partial answer could be mistaken for a complete one.

Reported in review.

---------

Co-authored-by: Sandeep Singh <[email protected]>
2026-08-22 23:57:42 +05:30
Jonas Lejon 534188ad22 fix(subscraping): use DialContext instead of the deprecated Dial (#1835)
golangci-lint reports SA1019 for net/http.Transport.Dial, deprecated since
Go 1.7. Because Test Builds declares needs: [lint], that single finding fails
the lint job and skips the build, test, race and example steps on every pull
request.

DialContext is the documented replacement and takes priority when both are set,
so behaviour is unchanged. golangci-lint goes from 1 issue to 0 across the tree.
2026-08-22 23:43:09 +05:30
dependabot[bot] cd6e6bb437 chore(deps): bump the modules group across 1 directory with 7 updates (#1830)
Bumps the modules group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [github.com/projectdiscovery/gologger](https://github.com/projectdiscovery/gologger) | `1.1.71` | `1.1.72` |
| [github.com/projectdiscovery/blackrock](https://github.com/projectdiscovery/blackrock) | `0.0.1` | `0.0.2` |
| [github.com/projectdiscovery/cdncheck](https://github.com/projectdiscovery/cdncheck) | `1.2.47` | `1.2.49` |
| [github.com/projectdiscovery/fastdialer](https://github.com/projectdiscovery/fastdialer) | `0.5.14` | `0.5.16` |
| [github.com/projectdiscovery/retryablehttp-go](https://github.com/projectdiscovery/retryablehttp-go) | `1.3.21` | `1.3.23` |
| [github.com/projectdiscovery/goflags](https://github.com/projectdiscovery/goflags) | `0.1.75` | `0.1.76` |



Updates `github.com/projectdiscovery/gologger` from 1.1.71 to 1.1.72
- [Release notes](https://github.com/projectdiscovery/gologger/releases)
- [Commits](https://github.com/projectdiscovery/gologger/compare/v1.1.71...v1.1.72)

Updates `github.com/projectdiscovery/blackrock` from 0.0.1 to 0.0.2
- [Release notes](https://github.com/projectdiscovery/blackrock/releases)
- [Commits](https://github.com/projectdiscovery/blackrock/compare/v0.0.1...v0.0.2)

Updates `github.com/projectdiscovery/cdncheck` from 1.2.47 to 1.2.49
- [Release notes](https://github.com/projectdiscovery/cdncheck/releases)
- [Commits](https://github.com/projectdiscovery/cdncheck/compare/v1.2.47...v1.2.49)

Updates `github.com/projectdiscovery/fastdialer` from 0.5.14 to 0.5.16
- [Release notes](https://github.com/projectdiscovery/fastdialer/releases)
- [Commits](https://github.com/projectdiscovery/fastdialer/compare/v0.5.14...v0.5.16)

Updates `github.com/projectdiscovery/networkpolicy` from 0.1.44 to 0.1.45
- [Release notes](https://github.com/projectdiscovery/networkpolicy/releases)
- [Commits](https://github.com/projectdiscovery/networkpolicy/compare/v0.1.44...v0.1.45)

Updates `github.com/projectdiscovery/retryablehttp-go` from 1.3.21 to 1.3.23
- [Release notes](https://github.com/projectdiscovery/retryablehttp-go/releases)
- [Commits](https://github.com/projectdiscovery/retryablehttp-go/compare/v1.3.21...v1.3.23)

Updates `github.com/projectdiscovery/goflags` from 0.1.75 to 0.1.76
- [Release notes](https://github.com/projectdiscovery/goflags/releases)
- [Commits](https://github.com/projectdiscovery/goflags/compare/v0.1.75...v0.1.76)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/gologger
  dependency-version: 1.1.72
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/blackrock
  dependency-version: 0.0.2
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/cdncheck
  dependency-version: 1.2.49
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/fastdialer
  dependency-version: 0.5.16
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/networkpolicy
  dependency-version: 0.1.45
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/retryablehttp-go
  dependency-version: 1.3.23
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: modules
- dependency-name: github.com/projectdiscovery/goflags
  dependency-version: 0.1.76
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: modules
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-22 23:00:35 +05:30
Mzack9999 717f59d8e7 Merge pull request #1809 from adamsjack711-ux/security/cap-response-body-size
fix(subscraping): cap untrusted source response bodies with a size limit
2026-08-10 14:45:54 +04:00
Mzack9999 7946c6edd6 optional limit 2026-08-10 14:32:32 +04:00