Skip to content

Commit

Permalink
Add Interface in Networkconfig ( Nuclei SDK ) (#4472)
Browse files Browse the repository at this point in the history
* misc update

* chore(deps): bump github.com/gin-gonic/gin from 1.9.0 to 1.9.1 (#4252)

Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.9.0 to 1.9.1.
- [Release notes](https://github.com/gin-gonic/gin/releases)
- [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md)
- [Commits](gin-gonic/gin@v1.9.0...v1.9.1)

---
updated-dependencies:
- dependency-name: github.com/gin-gonic/gin
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/docker/docker (#4316)

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 24.0.5+incompatible to 24.0.7+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](moby/moby@v24.0.5...v24.0.7)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix README_CN.md typos (#4369)

* add Interface in NetworkConfig

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Xc1Ym <xuedongyuming2233@gmail.com>
  • Loading branch information
4 people committed Dec 20, 2023
1 parent e6133ef commit 984dfaf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ type NetworkConfig struct {
MaxHostError int // Maximum number of host errors to allow before skipping that host
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

}

// WithNetworkConfig allows setting network config options
Expand All @@ -238,6 +240,7 @@ func WithNetworkConfig(opts NetworkConfig) NucleiSDKOptions {
e.opts.Retries = opts.Retries
e.opts.LeaveDefaultPorts = opts.LeaveDefaultPorts
e.hostErrCache = hosterrorscache.New(opts.MaxHostError, hosterrorscache.DefaultMaxHostsCount, opts.TrackError)
e.opts.Interface = opts.Interface
return nil
}
}
Expand Down

0 comments on commit 984dfaf

Please sign in to comment.