From cb7e7f574b7fb8bf985f8afc06ed904bebc78fce Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 25 Sep 2025 15:35:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20MML-udm=20dec=20key=E5=90=8E=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/tool/controller/mml.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/modules/tool/controller/mml.go b/src/modules/tool/controller/mml.go index 16dcda09..7dc24ba9 100644 --- a/src/modules/tool/controller/mml.go +++ b/src/modules/tool/controller/mml.go @@ -102,10 +102,14 @@ func (s MMLController) Command(c *gin.Context) { // 发送MML result := []string{} resultStr := "Success" + hasCommand := false for _, v := range body.Command { if v == "" { continue } + if strings.Contains(v, "dec key") { + hasCommand = true + } output, err := telnetClient.RunCMD(v + "\r\n") if err != nil { result = append(result, err.Error()) @@ -115,6 +119,16 @@ func (s MMLController) Command(c *gin.Context) { result = append(result, strings.TrimSpace(output)) } + // UDM 特殊命令处理 + if body.NeType == "UDM" && hasCommand { + output, err := s.neInfoService.NeRunSSHCmd(neInfo.NeType, neInfo.NeId, "cat /usr/local/etc/udm/ueKeyProfile.tmp") + if err != nil { + result = append(result, err.Error()) + } else { + result = append(result, output) + } + } + // 记录日志 mmlLog := model.MMLLog{ NeType: body.NeType,