diff --git a/commands/scan.go b/commands/scan.go index 6786be0d..827ebe94 100644 --- a/commands/scan.go +++ b/commands/scan.go @@ -66,6 +66,8 @@ func (*ScanCmd) Usage() string { [-debug] [-pipe] [-vvv] + [-ips] + [SERVER]... ` @@ -112,6 +114,8 @@ func (p *ScanCmd) SetFlags(f *flag.FlagSet) { ) f.BoolVar(&c.Conf.Pipe, "pipe", false, "Use stdin via PIPE") + + f.BoolVar(&c.Conf.DetectIPS, "ips", false, "retrieve IPS information") f.BoolVar(&c.Conf.Vvv, "vvv", false, "ssh -vvv") f.IntVar(&p.timeoutSec, "timeout", 5*60, diff --git a/config/config.go b/config/config.go index 668580df..be3e1eed 100644 --- a/config/config.go +++ b/config/config.go @@ -123,6 +123,7 @@ type Config struct { CacheDBPath string `json:"cacheDBPath,omitempty"` Vvv bool `json:"vvv,omitempty"` UUID bool `json:"uuid,omitempty"` + DetectIPS bool `json:"detectIps,omitempty"` CveDict GoCveDictConf `json:"cveDict,omitempty"` OvalDict GovalDictConf `json:"ovalDict,omitempty"` diff --git a/scan/base.go b/scan/base.go index 0f790b4e..e9aa24f4 100644 --- a/scan/base.go +++ b/scan/base.go @@ -356,6 +356,10 @@ func (l *base) detectDeepSecurity() (fingerprint string, err error) { } func (l *base) detectIPSs() { + if !config.Conf.DetectIPS { + return + } + ips := map[config.IPS]string{} fingerprint, err := l.detectDeepSecurity()