diff --git a/lib/config.go b/lib/config.go index 07c890e1df..3f3e21ae22 100644 --- a/lib/config.go +++ b/lib/config.go @@ -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 } }