9 Commits

Author SHA1 Message Date
Tarun Koyalwar 3cb054d976 Add wildcard certificate detection in JSON output (#1665)
* Add wildcard certificate detection in JSON output

This commit implements wildcard certificate detection for subdomains that
are covered by wildcard certificates (e.g., *.example.com). When sources
return results containing wildcard patterns, the subdomain is now marked
with a wildcard_certificate field in JSON output mode.

Key changes:
- Added WildcardCertificate field to HostEntry and Result structs
- Detection logic: checks if result.Value contains "*.subdomain" pattern
- Propagates wildcard flag through resolution pipeline
- JSON output includes wildcard_certificate field (omitted if false)
- Updates version to v2.9.1-dev
- Fix .goreleaser.yml 386 architecture quoting
- Add /subfinder to .gitignore

Note: wildcard_certificate field is not included when using -cs flag to
avoid breaking changes to the library API.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix wildcard certificate flag propagation with -nW flag

Fixed a bug where the wildcard_certificate field was being lost when using
the -nW flag (DNS resolution with wildcard filtering). The issue occurred
because when multiple sources find the same subdomain, only the first
occurrence is sent to the resolution pool. If a later source marks the
subdomain as having a wildcard certificate, that information was stored
in uniqueMap but never propagated to foundResults.

Solution: After resolution completes, merge wildcard certificate information
from uniqueMap into foundResults. This ensures that if any source marked a
subdomain as having a wildcard certificate, that flag is preserved in the
final output.

This ensures consistent behavior - wildcard_certificate field appears in
JSON output regardless of whether -nW flag is used.

Validation:
- Without -nW: api.nuclei.sh shows wildcard_certificate:true ✓
- With -nW: api.nuclei.sh shows wildcard_certificate:true ✓

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-05 21:49:07 +05:30
Mikel Olasagasti Uranga 6867e076f1 refactor: move v2 module code to root directory for cleaner structure
Keeps module path as github.com/projectdiscovery/subfinder/v2 to
preserve import compatibility.

Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
2025-07-10 15:27:42 +02:00
Mzack9999 7d89b5facb go mod v2 fix 2020-09-24 19:02:02 +02:00
Víctor Zamanillo 5b276221b6 Implements #245 2020-08-16 17:52:12 +02:00
Víctor Zamanillo b508618410 nolint for comma ok static check 2020-07-23 15:09:24 +02:00
Ice3man543 a4c861c5c0 Added conditional resolving support 2019-12-04 20:31:11 +05:30
Ice3man543 3678d7c7bb Added resolver client 2019-12-04 17:09:21 +05:30
Ice3man543 9385107c06 Initial resolver package 2019-12-03 23:42:21 +05:30
Ice3man543 ce4f3b09fe Started work on resolve package 2019-12-03 20:11:34 +05:30