mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-20 18:05:26 +00:00
Add SourceIP in NetworkConfig (#4566)
Co-authored-by: Abdelmalik KERBADOU <abdelmalik.kerbadou@intrinsec.com> Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
This commit is contained in:
parent
056073da25
commit
9b2b7ad3ad
@ -227,7 +227,7 @@ type NetworkConfig struct {
|
|||||||
TrackError []string // Adds given errors to max host error watchlist
|
TrackError []string // Adds given errors to max host error watchlist
|
||||||
DisableMaxHostErr bool // Disable max host error optimization (Hosts are not skipped even if they are not responding)
|
DisableMaxHostErr bool // Disable max host error optimization (Hosts are not skipped even if they are not responding)
|
||||||
Interface string // Interface to use for network scan
|
Interface string // Interface to use for network scan
|
||||||
|
SourceIP string // SourceIP sets custom source IP address for network requests
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithNetworkConfig allows setting network config options
|
// WithNetworkConfig allows setting network config options
|
||||||
@ -241,6 +241,7 @@ func WithNetworkConfig(opts NetworkConfig) NucleiSDKOptions {
|
|||||||
e.opts.LeaveDefaultPorts = opts.LeaveDefaultPorts
|
e.opts.LeaveDefaultPorts = opts.LeaveDefaultPorts
|
||||||
e.hostErrCache = hosterrorscache.New(opts.MaxHostError, hosterrorscache.DefaultMaxHostsCount, opts.TrackError)
|
e.hostErrCache = hosterrorscache.New(opts.MaxHostError, hosterrorscache.DefaultMaxHostsCount, opts.TrackError)
|
||||||
e.opts.Interface = opts.Interface
|
e.opts.Interface = opts.Interface
|
||||||
|
e.opts.SourceIP = opts.SourceIP
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user