Commit Graph
396 Commits
Author SHA1 Message Date
M09Ic d2a22e4e01 feat: expose reusable spray runner entrypoint 2026-05-08 10:12:54 -07:00
M09IcandClaude Opus 4.6 5179d7a33c ci: add pool shutdown regression tests and PR CI workflow
Add 19 tests in core/pool/pool_test.go covering:
- addAddition: normal, after cancel, wg balance, full buffer, concurrent
- sendProcess: normal, after cancel, full buffer, concurrent
- putToOutput/putToFuzzy: normal, after cancel, Outwg balance
- Handler lifecycle: processCh close exits handler, drains all items
- Shutdown sequence: no deadlock, cancel mid-flight
- Goroutine leak detection after full shutdown

Add .github/workflows/ci.yml:
- Runs on PR to master and push to master
- Tests on ubuntu-latest and windows-latest
- go build, go test -race, go vet

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-06 23:39:22 +08:00
M09IcandClaude Opus 4.6 7d293f8c72 fix: use ctx as unified shutdown signal to prevent channel close panics
- Replace additionClosed atomic with ctx-based guard in addAddition
- Add handlerDone chan to coordinate Handler goroutine lifecycle
- Add sendProcess method with select+ctx.Done protection
- Protect putToOutput/putToFuzzy/checkCh sends with select+ctx.Done
- Rewrite BrutePool.Close/CheckPool.Close with correct shutdown order:
  Cancel → Release pools → close(processCh) → <-handlerDone
- Fix doCrawl orphan wg.Add(1) with defer wg.Done()
- Fix analyzeDone inverted condition (replaced with handlerDone chan)
- Add ctx.Done check to Run monitor goroutine

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-06 23:39:09 +08:00
M09IcandClaude Opus 4.6 263958e760 fix: prevent send-on-closed-channel panic and baseline invalid on raw parse failure
- Replace close(additionCh) with additionClosed atomic.Bool flag to
  prevent panic when async producers (redirect/crawl/retry/append)
  write after pool shutdown
- Guard addAddition() with ctx.Err() and additionClosed check before send
- ParseRawResponse failure no longer marks baseline as invalid or
  returns early; log at debug level instead
- Read Location header from live response (resp.GetHeader) instead of
  re-parsed bl.Response.Header for reliability
- Add ParseRawResponse boundary tests (nil, empty, truncated, binary, etc.)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-06 23:08:19 +08:00
M09Ic b11b5535db chore: support finger send_data v1.2.5 2026-02-12 15:20:08 +08:00
Copilotandchainreactorbot 6837b01818 Fix --recon to extract info-tagged data (phone, email, ID) (#133)
* Initial plan

* Fix --recon plugin to extract both pentest and info data

The --recon flag was only extracting items tagged as "pentest", missing
important reconnaissance information tagged as "info" such as phone numbers,
emails, and ID cards. This caused the plugin to appear broken compared to v1.2.1.

Changed BuildPlugin() to combine both "pentest" and "info" tagged extractors
when ReconPlugin is enabled, restoring the expected behavior of extracting
comprehensive reconnaissance data including:
- Phone numbers (info)
- Email addresses (info)
- AWS keys (pentest)
- Passwords (pentest)
- And other sensitive information

Tested with a sample HTML page containing phone, email, and AWS key data,
confirming all three are now properly extracted and displayed.

Co-authored-by: chainreactorbot <[email protected]>

* Add *.stat to .gitignore and remove test stat file

* Optimize --recon extractor initialization with pre-allocated capacity

Address code review feedback by pre-allocating the slice capacity based on
the combined size of pentest and info extractors. This avoids multiple
reallocations during append operations, improving performance.

Also simplified the conditional checks to use len() instead of map lookups,
which is more idiomatic and slightly more efficient.

Tested with multiple extraction types (phones, emails, IPs, AWS keys) and
confirmed all are properly extracted.

Co-authored-by: chainreactorbot <[email protected]>

* Simplify --recon extractor code by removing unnecessary length checks

Remove redundant length checks before append operations. The append operation
with spread operator safely handles empty slices without requiring explicit
guards, making the code cleaner and more idiomatic.

This change does not affect functionality - empty slices are appended safely
without any performance penalty.

Co-authored-by: chainreactorbot <[email protected]>

* Add nil-safety for --recon extractor initialization

Extract pentest and info extractors into variables before using them. This
approach is nil-safe because len() on nil slices returns 0 and append() with
nil slices works correctly in Go. This also makes the code cleaner by avoiding
repeated map lookups.

Addresses code review feedback about potential panics if the extractor maps
don't exist or are nil.

Co-authored-by: chainreactorbot <[email protected]>

* Remove binary and add spray to .gitignore

* Remove binary from repo and update .gitignore

Co-authored-by: chainreactorbot <[email protected]>

* Remove stat files that should be ignored

* Fix .gitignore to properly exclude stat files and binary

Co-authored-by: chainreactorbot <[email protected]>

* Complete --recon functionality fix with security verification

Co-authored-by: chainreactorbot <[email protected]>

* Revert go.mod and go.sum to keep go 1.20 version

按用户要求,不升级 go.mod 版本,保持原样:
- 恢复 go 版本从 1.21 到 1.20
- 移除 toolchain go1.24.12 行
- 恢复 go.sum 到之前的状态

已验证:
- 代码可以成功编译
- --recon 功能正常工作(提取 phone 和 mail)
- 所有功能保持不变

Co-authored-by: chainreactorbot <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: chainreactorbot <[email protected]>
2026-02-12 15:19:23 +08:00
M09Ic d733b4fb93 chore: check mod redirect 2026-01-29 01:27:29 +08:00
M09Ic 9a0858fd3c chore: fix new statistor 2026-01-29 00:34:04 +08:00
M09Ic 5661a4acad chore: bump fingers and neutron v1.2.4 2026-01-21 10:59:11 +08:00
root 20533e9d92 chore: remove NewDefaultOption and clean code 2026-01-21 10:41:13 +08:00
M09Ic 9a4c1af362 fix: request safe path join 2026-01-19 18:02:39 +08:00
M09Ic a3d7d1eccb fix: pool wg negative count 2026-01-19 18:02:18 +08:00
M09Ic 6618e025c3 fix: content type parse 2026-01-19 17:32:04 +08:00
M09Ic 709a701cf7 fix: addAddition deadlock 2025-12-10 11:27:04 +08:00
M09Ic a93d0397e6 chore: fix host brute not work 2025-12-09 11:30:16 +08:00
M09Ic 4e789b8f2e chore: update templates.go 2025-12-06 01:08:59 +08:00
M09Ic b364729bfc feat: check support host flag
- add function options validate
2025-12-05 18:31:29 +08:00
M09Ic 8030998b5e feat: support -o tree format 2025-12-05 14:25:35 +08:00
M09Ic f248e740ec chore: remove debug v1.2.3 2025-12-05 01:36:05 +08:00
M09Ic b388b2fda4 feat: add spray sdk 2025-12-05 01:33:57 +08:00
M09Ic 69e1d30143 chore: improve init config table 2025-12-05 01:10:37 +08:00
M09Ic d201ced3a9 feat: support --finger-file dynamic load fingers from file/url 2025-12-05 00:58:33 +08:00
M09Ic 5b0c90f967 feat: add --host flag, https://github.com/chainreactors/spray/issues/120.
fix: body not work, https://github.com/chainreactors/spray/issues/113
2025-12-05 00:58:33 +08:00
M09Ic 050d32214f fix: frameworks panic , https://github.com/chainreactors/spray/issues/117 2025-12-05 00:58:33 +08:00
M09Ic db9c0f0e4b fix: raw query panic. https://github.com/chainreactors/spray/issues/125 2025-12-05 00:58:33 +08:00
M09Ic 9175a0cc54 fix: check mod stat not work 2025-12-05 00:58:33 +08:00
M09Ic ba3265b0f2 fix: checkpool deadlock 2025-12-05 00:58:33 +08:00
M09Ic 096276fdb5 fix: cicd releaser v1.2.2 2025-06-05 13:59:13 +08:00
M09Ic 0b379cfc36 feat: support unique when format result, https://github.com/chainreactors/spray/issues/104 2025-06-05 13:52:30 +08:00
M09Ic e2f8592ba0 feat: 支持通配符状态码, https://github.com/chainreactors/spray/issues/38 2025-06-05 13:45:48 +08:00
M09Ic 4092e86884 feat: recover fuzzuli generate algorithm 2025-06-05 12:55:36 +08:00
M09Ic ac31bb61b5 fix: csv format , https://github.com/chainreactors/spray/issues/97 2025-06-05 12:46:53 +08:00
M09Ic 48141240c4 fix: addition word not safe join path, https://github.com/chainreactors/spray/issues/106 2025-06-05 12:34:06 +08:00
M09Ic 9f50d437ce fix: null word not continue, https://github.com/chainreactors/spray/issues/108 2025-06-05 12:29:17 +08:00
M09Ic 6a6581f41e fix: -e not expect , https://github.com/chainreactors/spray/issues/108 2025-06-05 12:29:02 +08:00
M09Ic 0073e330e0 fix: fix log and option 2025-06-05 11:41:11 +08:00
M09Ic 54755b792d chore: add black,white,unique short flag 2025-05-20 00:23:25 +08:00
M09Ic 11c7293c31 chore: append-rule add short flag -R 2025-05-12 23:03:17 +08:00
M09Ic 886fe13d30 fix: crawl and url not print 2025-04-18 21:20:00 +08:00
M09Ic 36f0bd15b7 fix: check pool net set headers v1.2.1 2025-03-04 14:58:28 +08:00
M09Ic 97b8ba3cdf fix: brute init not set header, https://github.com/chainreactors/spray/issues/94 2025-03-04 14:56:48 +08:00
M09Ic 139491bac3 fix: map panic, https://github.com/chainreactors/spray/issues/93 2025-03-04 14:45:31 +08:00
M09Ic 5d16990654 fix: adapt template yaml v1.2.0 2025-02-23 00:02:20 +08:00
M09Ic 8d1e22142f ci: fix golang version go1.20 2025-02-22 21:05:39 +08:00
M09Ic fa9f681bff ci: fix golang version go1.20 2025-02-22 21:01:00 +08:00
M09Ic 5a9458fb0c feat: support proxyclient for http and fasthttp 2025-02-22 20:58:24 +08:00
M09Ic cb3598b4be refactor: remove internal pkg, use engine replace
fix: chunk mod not read
fix: nil bar panic
enhance: add default accept and user-agent
2025-02-22 20:31:32 +08:00
M09Ic 4f7707a22e ci: update gorelease go version to 1.20 2025-02-22 14:41:37 +08:00
M09Ic 74f60669d8 chore: improve format output 2025-02-22 14:38:24 +08:00
M09Ic 0e76657248 fix: init failed bar not close and total bar not wait 2025-02-22 14:01:10 +08:00