Support Debian

This commit is contained in:
knqyf263
2017-04-22 17:02:35 +09:00
committed by kota kanbe
parent 2cec20c7ee
commit 10a27042b5
8 changed files with 295 additions and 32 deletions

View File

@@ -35,19 +35,20 @@ import (
// ScanCmd is Subcommand of host discovery mode
type ScanCmd struct {
debug bool
configPath string
resultsDir string
logDir string
cacheDBPath string
httpProxy string
askKeyPassword bool
containersOnly bool
skipBroken bool
sshNative bool
pipe bool
timeoutSec int
scanTimeoutSec int
debug bool
configPath string
resultsDir string
logDir string
cacheDBPath string
httpProxy string
askKeyPassword bool
containersOnly bool
packageListOnly bool
skipBroken bool
sshNative bool
pipe bool
timeoutSec int
scanTimeoutSec int
}
// Name return subcommand name
@@ -132,6 +133,12 @@ func (p *ScanCmd) SetFlags(f *flag.FlagSet) {
"Ask ssh privatekey password before scanning",
)
f.BoolVar(
&p.packageListOnly,
"package-list-only",
false,
"List all packages without scan")
f.BoolVar(
&p.pipe,
"pipe",
@@ -223,6 +230,7 @@ func (p *ScanCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{})
c.Conf.SSHNative = p.sshNative
c.Conf.HTTPProxy = p.httpProxy
c.Conf.ContainersOnly = p.containersOnly
c.Conf.PackageListOnly = p.packageListOnly
c.Conf.SkipBroken = p.skipBroken
util.Log.Info("Validating config...")