Add ips flag to scan (#861)

* add scan -ips flag

* fix usage
This commit is contained in:
Tomoya Amachi
2019-07-04 18:42:12 +09:00
committed by Kota Kanbe
parent 836e4704f8
commit 8a37de0686
3 changed files with 9 additions and 0 deletions

View File

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

View File

@@ -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"`

View File

@@ -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()