* Add pseudo server type for non-ssh scanning (only cpe scan) #512 * Don't check hostname for pseudo type * Update README.md
This commit is contained in:
@@ -78,6 +78,11 @@ const (
|
||||
SUSEOpenstackCloud = "suse.openstack.cloud"
|
||||
)
|
||||
|
||||
const (
|
||||
// ServerTypePseudo is used for ServerInfo.Type
|
||||
ServerTypePseudo = "pseudo"
|
||||
)
|
||||
|
||||
//Config is struct of Configuration
|
||||
type Config struct {
|
||||
Debug bool
|
||||
@@ -446,6 +451,9 @@ type ServerInfo struct {
|
||||
// For CentOS, RHEL, Amazon
|
||||
Enablerepo []string
|
||||
|
||||
// "pseudo" or ""
|
||||
Type string
|
||||
|
||||
// used internal
|
||||
LogMsgAnsiColor string // DebugLog Color
|
||||
Container Container
|
||||
|
||||
@@ -62,7 +62,7 @@ func (c TOMLLoader) Load(pathToToml, keyPass string) error {
|
||||
s := ServerInfo{ServerName: name}
|
||||
|
||||
s.Host = v.Host
|
||||
if len(s.Host) == 0 {
|
||||
if len(s.Host) == 0 && v.Type != ServerTypePseudo {
|
||||
return fmt.Errorf("%s is invalid. host is empty", name)
|
||||
}
|
||||
|
||||
@@ -175,6 +175,8 @@ func (c TOMLLoader) Load(pathToToml, keyPass string) error {
|
||||
}
|
||||
}
|
||||
|
||||
s.Type = v.Type
|
||||
|
||||
s.LogMsgAnsiColor = Colors[i%len(Colors)]
|
||||
i++
|
||||
|
||||
|
||||
Reference in New Issue
Block a user