mirror of https://github.com/daffainfo/nuclei.git
Add SourceIP in NetworkConfig (#4566)
Co-authored-by: Abdelmalik KERBADOU <abdelmalik.kerbadou@intrinsec.com> Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>dev
parent
056073da25
commit
9b2b7ad3ad
|
@ -227,7 +227,7 @@ type NetworkConfig struct {
|
|||
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)
|
||||
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
|
||||
|
@ -241,6 +241,7 @@ func WithNetworkConfig(opts NetworkConfig) NucleiSDKOptions {
|
|||
e.opts.LeaveDefaultPorts = opts.LeaveDefaultPorts
|
||||
e.hostErrCache = hosterrorscache.New(opts.MaxHostError, hosterrorscache.DefaultMaxHostsCount, opts.TrackError)
|
||||
e.opts.Interface = opts.Interface
|
||||
e.opts.SourceIP = opts.SourceIP
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue