From 2064e893566a18d09c0d8738f18f56eefe17d8f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AC=E6=98=8E?= <83812544+Ed1s0nZ@users.noreply.github.com> Date: Mon, 12 Jan 2026 18:55:12 +0800 Subject: [PATCH] Add files via upload --- internal/security/executor.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/security/executor.go b/internal/security/executor.go index e1f70640..5cce1fc7 100644 --- a/internal/security/executor.go +++ b/internal/security/executor.go @@ -3,6 +3,7 @@ package security import ( "bufio" "context" + "encoding/json" "fmt" "io" "os/exec" @@ -616,6 +617,13 @@ func (e *Executor) formatParamValue(param config.ParameterConfig, value interfac return strings.Join(strs, ",") } return fmt.Sprintf("%v", value) + case "object": + // 对象/字典:序列化为 JSON 字符串 + if jsonBytes, err := json.Marshal(value); err == nil { + return string(jsonBytes) + } + // 如果 JSON 序列化失败,回退到默认格式化 + return fmt.Sprintf("%v", value) default: formattedValue := fmt.Sprintf("%v", value) // 特殊处理:对于 ports 参数(通常是 nmap 等工具的端口参数),清理空格