25 Commits

Author SHA1 Message Date
Charles Wong c1ce78eac9 fix(ratelimit): honour -rl global fallback and -rls duration (#1434)
Two bugs in rate limit handling:

1. Global -rl flag was ignored for sources without a per-source override.
   Only sources explicitly listed in -rls got rate-limited; all others
   ran unlimited, defeating the purpose of -rl.

2. Per-source duration from -rls (e.g. hackertarget=2/m) was silently
   dropped. runner.go stored MaxCount but discarded Duration, so all
   sources defaulted to per-second regardless of the /m or /s suffix.

Root cause: runner.go converted goflags.RateLimitMap → CustomRateLimit
but only copied MaxCount. buildMultiRateLimiter only checked per-source
limits, never falling back to the global rate.

Changes:
- Add CustomDuration field to CustomRateLimit struct
- Store both MaxCount and Duration from -rls in runner.go
- Add resolveSourceRateLimit() with clear priority:
  per-source > global > unlimited
- Guard against nil rateLimit in buildMultiRateLimiter
- Add 9 unit tests covering all combinations

Fixes #1434
2026-03-10 09:47:09 -07:00
Recep Gunes fba1cc3d27 fix timeout flag not working for crtsh source 2026-02-02 18:13:11 +03:00
Mzack9999 4bba544dfe Merge branch 'dev' into feature/request-tracking-stats 2026-01-07 18:07:37 +04:00
Doğan Can Bakır 1ca2a67f92 add optional API key support for sources
- add KeyRequirement enum with three states: NoKey, OptionalKey, RequiredKey
- add KeyRequirement() method to Source interface
- update config generation to include optional sources
- update env var loading for optional sources
- update source listing with ~ marker for optional sources
- mark hackertarget, leakix, reconeer as OptionalKey
- fix hackertarget and reconeer to work without API key

closes #1695
2026-01-05 15:00:59 +03:00
Doğan Can Bakır e96320ec38 add request tracking to -stats flag
Adds request counting to all sources to help users monitor API usage
and debug quota consumption issues like #1562.

Changes:
- Add Requests field to Statistics struct
- Track HTTP requests in all 53 sources
- Display request count in stats output

Closes #1698
2026-01-05 14:14:20 +03:00
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 63d74bdfad We move to Robtex PRO API
Change the use from free API to PRO with an API key because free is (strictly) rate limited and does not offer any profit.
2020-09-21 20:34:42 +02:00
Víctor Zamanillo 8b83c0516a Implemented ThreatBook source 2020-09-13 21:55:31 +02:00
Sepehrdad Sh 84663dd4df recon.dev: fix token 2020-09-04 13:57:57 +00:00
Víctor Zamanillo caf8062b92 Simplified subscraping HTTP operations with custom agent methods 2020-07-23 22:34:24 +02:00
Víctor Zamanillo 2f198a3dd8 Fixed hugeParams (gocritic)
We passet huge parameters by pointer
2020-07-22 16:14:26 +02:00
Víctor Zamanillo 47a37a7dde Fixed File is not gofmt-ed with -s (gofmt)
Fixed running 'gofmt -s -w file'
2020-07-22 15:38:38 +02:00
Víctor Zamanillo eda27f6934 Handle GitHub Search request rate limit
- Support multiple tokens to randomly pick one to avoid exceeding request rate limit
- Retry after "Retry-After" seconds header value if rate limit abuse is detected.
2020-07-15 13:19:31 +02:00
Víctor Zamanillo 032ee977dd Added GitHub search source
Search for subdomains in GitHub code providing a Personal access token
2020-07-05 20:04:20 +02:00
Akhil Reni fdb25a971c added intelx source which also supports https://phonebook.cz/ 2020-06-07 06:18:15 +05:30
bauthard 5c6b2cd0b4 Merge pull request #240 from akhil-reni/master
Added spyse source
2020-05-22 07:59:00 +05:30
Akhil Reni 6e6ecf756c Fixed typo 2020-05-22 07:45:57 +05:30
Akhil Reni 8a85769abf Added spyse source 2020-05-18 22:29:18 +05:30
lc 6867824a6b Add Chaos upload functionality, -upload flag 2020-05-17 16:18:09 -05:00
lc f3adc18a18 Add ZoomEye module 2020-05-16 00:32:03 -05:00
lc 0ae69573fd Add DNSDB and sublist3r API modules 2020-05-15 22:12:20 -05:00
Ice3man543 72be49a73c Configs for censys 2019-12-05 15:39:42 +05:30
Ice3man543 e8d0b8e6c4 Added shodan passive source 2019-12-05 00:12:55 +05:30
Ice3man543 a045078bb0 Added subdomain scraping sources 2019-12-03 18:07:11 +05:30