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,