~fmac/dracaena

9afa4e94b90520a9eebd7c44eb1d5fd5680c2be3 — Francesco Camuffo 13 days ago 981a637 main
Add support for global args
2 files changed, 4 insertions(+), 1 deletions(-)

M config.yaml.example
M dracaena.go
M config.yaml.example => config.yaml.example +2 -1
@@ 4,11 4,12 @@ stringclosed: ❌
stringfiltered: f
stringunfiltered: F
stringerror: ERR
globargs: ["-T4"]
targets:
    - id: 1
      host: 9.9.9.9
      name: dns
      args: ["-T4", "-Pn", "-p", "53"]
      args: ["-Pn", "-p", "53"]
    - id: 2
      host: x.org
      args: ["-Pn", "-p", "80"]

M dracaena.go => dracaena.go +2 -0
@@ 26,6 26,7 @@ type Config struct {
	StringUnfiltered string
	StringError      string
	Targets          []Target
	GlobArgs         []string
}

var conf Config


@@ 41,6 42,7 @@ func nmapWorker(id int, jobs <-chan Target, resChan chan<- scanReturn) {
	for j := range jobs {
		scanner, err := nmap.NewScanner(
			nmap.WithTargets(j.Host),
			nmap.WithCustomArguments(conf.GlobArgs...),
			nmap.WithCustomArguments(j.Args...),
		)
		if err != nil {