修复硬编码中文,迁移废弃的 uuid 依赖

- flag.go: -local/-perf 参数改用 i18n.GetText,checkParameterConflicts 改用 i18n.Tr
- 补齐中英文 locale 中 flag_local_plugin/flag_perf_stats/param_local_multi_plugin
- satori/go.uuid 迁移为 google/uuid (satori 已废弃)
- CI 补充 lint Go 版本说明
This commit is contained in:
ZacharyZcR
2026-05-18 02:43:45 +08:00
parent 72403ebb32
commit 2f2b30763c
7 changed files with 21 additions and 11 deletions
+3 -3
View File
@@ -113,7 +113,7 @@ func Flag(Info *HostInfo) error {
flag.Int64Var(&fv.GlobalTimeout, "gt", 180, i18n.GetText("flag_global_timeout"))
flag.BoolVar(&fv.DisablePing, "np", false, i18n.GetText("flag_disable_ping"))
flag.BoolVar(&fv.DisableTcpProbe, "ntp", false, i18n.GetText("flag_disable_tcp_probe"))
flag.StringVar(&fv.LocalPlugin, "local", "", "指定本地插件名称 (如: cleaner, systeminfo, keylogger 等)")
flag.StringVar(&fv.LocalPlugin, "local", "", i18n.GetText("flag_local_plugin"))
flag.BoolVar(&fv.AliveOnly, "ao", false, i18n.GetText("flag_alive_only"))
// ═════════════════════════════════════════════════
@@ -187,7 +187,7 @@ func Flag(Info *HostInfo) error {
flag.StringVar(&fv.LogLevel, "log", LogLevelBaseInfoSuccess, i18n.GetText("flag_log_level"))
flag.BoolVar(&fv.Debug, "debug", false, i18n.GetText("flag_debug"))
flag.BoolVar(&fv.DisableProgress, "nopg", false, i18n.GetText("flag_disable_progress"))
flag.BoolVar(&fv.PerfStats, "perf", false, "输出性能统计JSON")
flag.BoolVar(&fv.PerfStats, "perf", false, i18n.GetText("flag_perf_stats"))
// ═════════════════════════════════════════════════
// 其他参数
@@ -310,7 +310,7 @@ func checkParameterConflicts() error {
invalidChars := []string{",", ";", " ", "|", "&"}
for _, char := range invalidChars {
if strings.Contains(fv.LocalPlugin, char) {
return fmt.Errorf("本地插件只能指定单个插件,不支持使用 '%s' 分隔的多个插件", char)
return fmt.Errorf(i18n.Tr("param_local_multi_plugin", char))
}
}
}
+6
View File
@@ -30,6 +30,8 @@ flag_disable_ping:
other: "Disable ping detection"
flag_disable_tcp_probe:
other: "Disable TCP supplementary probe"
flag_local_plugin:
other: "Specify local plugin name (e.g.: cleaner, systeminfo, keylogger)"
flag_debug:
other: "Enable debug mode, write logs to fscan_debug.log"
flag_alive_only:
@@ -120,6 +122,8 @@ flag_log_level:
other: "Log level"
flag_disable_progress:
other: "Disable progress bar"
flag_perf_stats:
other: "Output performance stats in JSON"
flag_shellcode:
other: "Shellcode"
flag_reverse_shell_target:
@@ -213,6 +217,8 @@ target_local_mode:
other: "Local scan mode"
param_conflict_ao_icmp_both:
other: "Note: Both -ao and -m icmp specified, both enable alive detection mode"
param_local_multi_plugin:
other: "Only a single local plugin can be specified, multiple plugins separated by '{{.Arg1}}' are not supported"
# ========================= Parser Messages =========================
parser_empty_input:
+6
View File
@@ -30,6 +30,8 @@ flag_disable_ping:
other: "禁用ping探测"
flag_disable_tcp_probe:
other: "禁用TCP补充探测"
flag_local_plugin:
other: "指定本地插件名称 (如: cleaner, systeminfo, keylogger 等)"
flag_debug:
other: "开启调试模式,日志写入fscan_debug.log"
flag_alive_only:
@@ -120,6 +122,8 @@ flag_log_level:
other: "日志级别"
flag_disable_progress:
other: "禁用进度条"
flag_perf_stats:
other: "输出性能统计JSON"
flag_shellcode:
other: "Shellcode"
flag_reverse_shell_target:
@@ -213,6 +217,8 @@ target_local_mode:
other: "本地扫描模式"
param_conflict_ao_icmp_both:
other: "提示: 同时指定了 -ao 和 -m icmp,两者功能相同,使用存活探测模式"
param_local_multi_plugin:
other: "本地插件只能指定单个插件,不支持使用 '{{.Arg1}}' 分隔的多个插件"
# ========================= 解析器消息 =========================
parser_empty_input: