yellow~ opinionated web scanning pipeline for pentesters in a hurry |
| git clone https://github.com/djnnvx/yellow.git |
| log | files | refs | archive | README | LICENSE |
module.go (1141B)
1 package core 2 3 import "fmt" 4 5 // Context carries config and shared state for a single target through every Module. 6 type Context struct { 7 Domain string // current target (full URL for scan, domain for osint) 8 ScanPath string // per-target output directory 9 Proxy string 10 DryRun bool 11 RateLimit int32 12 13 Wordlist string // scan: gobuster wordlist 14 Insecure bool // scan: skip TLS verification / force http 15 EmailsFile string // osint: leaker emails file 16 17 Techs []string // scan: wappalyzer detections, consumed by cvemap 18 Domains []string // osint: discovered assets, consumed by shodan 19 URLs []string // scan: katana crawl results, consumed by nuclei/gobuster 20 } 21 22 // Module is a single recon step. Run reports its own progress to stdout and 23 // returns an error only for failures the orchestrator should surface. 24 type Module interface { 25 Name() string 26 Run(ctx *Context) error 27 } 28 29 // RunModules runs each module in order, surfacing any error it returns. 30 func RunModules(ctx *Context, modules []Module) { 31 for _, m := range modules { 32 if err := m.Run(ctx); err != nil { 33 fmt.Printf("[!] %s: %v\n", m.Name(), err) 34 } 35 } 36 }