diff --git a/common/config/types.go b/common/config/types.go index 8326802..359bb6a 100644 --- a/common/config/types.go +++ b/common/config/types.go @@ -54,7 +54,7 @@ type ScanControlConfig struct { GlobalTimeout int64 `json:"global_timeout"` // 整体扫描超时时间(秒) // LiveTop 已移除,改为智能控制 DisablePing bool `json:"disable_ping"` // 是否禁用主机存活性检测 - EnableFingerprint bool `json:"enable_fingerprint"` // 是否启用服务指纹识别 + // EnableFingerprint 已删除:服务指纹识别默认启用 LocalMode bool `json:"local_mode"` // 是否启用本地信息收集模式 } diff --git a/common/flag.go b/common/flag.go index e36c8ce..97a12af 100644 --- a/common/flag.go +++ b/common/flag.go @@ -21,7 +21,7 @@ var ( ModuleThreadNum int GlobalTimeout int64 - EnableFingerprint bool + // EnableFingerprint 已删除:服务指纹识别默认启用 AddUsers string AddPasswords string @@ -146,7 +146,7 @@ func Flag(Info *HostInfo) { flag.Int64Var(&GlobalTimeout, "gt", 180, i18n.GetText("flag_global_timeout")) // LiveTop 参数已移除,改为智能控制 flag.BoolVar(&DisablePing, "np", false, i18n.GetText("flag_disable_ping")) - flag.BoolVar(&EnableFingerprint, "fp", false, i18n.GetText("flag_enable_fingerprint")) + // 移除-fp参数:服务指纹识别已默认启用,无需额外参数控制 flag.StringVar(&LocalPlugin, "local", "", "指定本地插件名称 (如: cleaner, avdetect, keylogger 等)") flag.BoolVar(&AliveOnly, "ao", false, i18n.GetText("flag_alive_only")) diff --git a/common/i18n/messages/flag.go b/common/i18n/messages/flag.go index dd661ba..0e42ccc 100644 --- a/common/i18n/messages/flag.go +++ b/common/i18n/messages/flag.go @@ -62,10 +62,7 @@ var FlagMessages = map[string]map[string]string{ LangZH: "禁用ping探测", LangEN: "Disable ping detection", }, - "flag_enable_fingerprint": { - LangZH: "启用指纹识别", - LangEN: "Enable fingerprinting", - }, + // "flag_enable_fingerprint" 已删除:服务指纹识别默认启用 "flag_local_mode": { LangZH: "本地扫描模式", LangEN: "Local scan mode", diff --git a/core/PortScan.go b/core/PortScan.go index 0bb29e8..ebcbd79 100644 --- a/core/PortScan.go +++ b/core/PortScan.go @@ -146,25 +146,23 @@ func EnhancedPortScan(hosts []string, ports string, timeout int64) []string { sb.WriteString(" 版本:" + serviceInfo.Version) } - // 添加详细信息(在-fp启用时) - if common.EnableFingerprint { - for k, v := range serviceInfo.Extras { - if v == "" { - continue - } - switch k { - case "vendor_product": - sb.WriteString(" 产品:" + v) - case "os": - sb.WriteString(" 系统:" + v) - case "info": - sb.WriteString(" 信息:" + v) - } + // 添加详细服务信息(默认启用) + for k, v := range serviceInfo.Extras { + if v == "" { + continue } + switch k { + case "vendor_product": + sb.WriteString(" 产品:" + v) + case "os": + sb.WriteString(" 系统:" + v) + case "info": + sb.WriteString(" 信息:" + v) + } + } - if len(serviceInfo.Banner) > 0 && len(serviceInfo.Banner) < 100 { - sb.WriteString(" Banner:[" + strings.TrimSpace(serviceInfo.Banner) + "]") - } + if len(serviceInfo.Banner) > 0 && len(serviceInfo.Banner) < 100 { + sb.WriteString(" Banner:[" + strings.TrimSpace(serviceInfo.Banner) + "]") } // 统一输出端口和服务信息