Add SourceIP in NetworkConfig (#4566)

Co-authored-by: Abdelmalik KERBADOU <abdelmalik.kerbadou@intrinsec.com>
Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
dev
Anemys 2024-01-07 23:36:08 +01:00 committed by GitHub
parent 056073da25
commit 9b2b7ad3ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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
}
}