mirror of
https://github.com/lunchcat/sif.git
synced 2026-07-28 14:37:01 -07:00
fix(modules): route module scans through the shared http transport (#318)
module execution built a bare http client, so -proxy, -H, -cookie and -rate-limit applied to every other scanner but silently not to module scans. route through httpx.Client so modules share the configured transport like the rest of the run. Co-authored-by: vmfunc <vmfunc.lc@gmail.com>
This commit is contained in:
@@ -746,10 +746,14 @@ func (app *App) scanTarget(url, storeDir string, wantReport bool) (targetScan, e
|
||||
toRun = deduped
|
||||
|
||||
// Execute modules
|
||||
// Execute modules. Client routes through the shared httpx transport so
|
||||
// -proxy/-H/-cookie/-rate-limit apply to module scans the same as every
|
||||
// other scanner instead of each module dialing out on a bare client.
|
||||
opts := modules.Options{
|
||||
Timeout: app.settings.Timeout,
|
||||
Threads: app.settings.Threads,
|
||||
LogDir: app.settings.LogDir,
|
||||
Client: httpx.Client(app.settings.Timeout),
|
||||
}
|
||||
|
||||
for _, m := range toRun {
|
||||
|
||||
Reference in New Issue
Block a user