How des1red/cwrap works
cwrap is a CLI for identity-aware HTTP testing: users express fetch/send intent, discover targets with scan or recon, then confirm findings and expand exploit chains from recon reports. Its central recon workflow probes with multiple identities, compares responses, records authorization signals, and writes a report; session persistence supports later runs. The README documents these capabilities, but the excerpts do not show most runtime dispatch and call sites, so several links are documented workflow relationships rather than traced calls.
Main entry points: recon.go Recon orchestration · behavior Identity probing · probe Exploit probes · root.go Command interface
Components 21
CLI and requests
- Command interface
cmd/root.go - HTTP intent
internal/intent - Request execution
internal/runner - Fetch and send
internal/intent
Surface discovery
- Staged scan
internal/scan - Baseline filtering
internal/scan/baseline.go
Identity-aware recon
- Recon orchestration
internal/recon/recon.go - HTTP analysis
internal/recon/http - API analysis
internal/recon/api - Identity probing
internal/recon/behavior - Endpoint intelligence
internal/recon/jsintel - Findings knowledge
internal/recon/knowledge - HTTP transport
internal/recon/transport
Reports and state
- Session persistence
internal/recon/session - Recon reports
internal/recon/report
Exploit confirmation
- Report loading
internal/exploit/report - Exploit probes
internal/exploit/probe - Exploit chains
internal/exploit/chain - HTTP replay
internal/exploit/replay - Exploit results
internal/exploit/result
Other components
- User
Connections 21
- User → Command interface: runs commands
README.md - Command interface → HTTP intent: expresses intent
README.md - HTTP intent → Request execution: builds requests
README.md - User → Fetch and send: requests resources
README.md - User → Staged scan: discovers paths
README.md - Staged scan → Baseline filtering: filters responses
README.md - User → Recon orchestration: starts analysis
README.md - Recon orchestration → HTTP analysis: selects profile
README.md - Recon orchestration → API analysis: selects profile
README.md - HTTP analysis → Identity probing: probes identities
internal/recon/http/engine.go - API analysis → Identity probing: probes identities
internal/recon/api/engine.go - Identity probing → HTTP transport: sends probes
- Identity probing → Endpoint intelligence: learns endpoints
README.md - Identity probing → Findings knowledge: records observations
internal/recon/behavior/storage.go - Recon orchestration → Session persistence: reuses sessions
README.md - Recon orchestration → Recon reports: writes findings
README.md - User → Report loading: supplies report
README.md - Report loading → Exploit probes: loads for testing
README.md - Exploit probes → HTTP replay: replays requests
- Exploit probes → Exploit chains: expands findings
README.md - Exploit probes → Exploit results: records outcomes