diff --git a/constant/constant.go b/constant/constant.go index 8a55d1c1..d552cb47 100644 --- a/constant/constant.go +++ b/constant/constant.go @@ -55,4 +55,7 @@ const ( // ServerTypePseudo is used for ServerInfo.Type, r.Family ServerTypePseudo = "pseudo" + + // DeepSecurity + DeepSecurity = "deepsecurity" ) diff --git a/scanner/base.go b/scanner/base.go index f2ca134b..95d0e3c6 100644 --- a/scanner/base.go +++ b/scanner/base.go @@ -357,15 +357,13 @@ func (l *base) detectDeepSecurity() (string, error) { return "", xerrors.Errorf("Failed to detect deepsecurity %s", l.ServerInfo.ServerName) } -const deepSecurity string = "deepsecurity" - func (l *base) detectIPS() { ips := map[string]string{} fingerprint, err := l.detectDeepSecurity() if err != nil { return } - ips[deepSecurity] = fingerprint + ips[constant.DeepSecurity] = fingerprint l.ServerInfo.IPSIdentifiers = ips }