Update scan.go

This commit is contained in:
ciphersaw 2025-04-26 11:07:14 +08:00
parent aaa910d363
commit 6814aeecc3

10
scan.go
View File

@ -249,12 +249,12 @@ func detectPrivilegeEscalation(AI string, reqA, resp1, resp2, statusB string) (s
model := "deepseek-chat" model := "deepseek-chat"
aiurl := "https://api.deepseek.com/v1/chat/completions" aiurl := "https://api.deepseek.com/v1/chat/completions"
apikey := config.GetConfig().APIKeys.DeepSeek apikey := config.GetConfig().APIKeys.DeepSeek
result, err = aiapis.AIScan(model, aiurl, apikey, reqA, resp1, resp2, statusB) // 调用 kimi 检测是否越权 result, err = aiapis.AIScan(model, aiurl, apikey, reqA, resp1, resp2, statusB) // 调用 deepseek 检测是否越权
case "qianwen": case "qianwen":
model := "qwen-plus" model := "qwen-plus"
aiurl := "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions" aiurl := "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions"
apikey := config.GetConfig().APIKeys.Qianwen apikey := config.GetConfig().APIKeys.Qianwen
result, err = aiapis.AIScan(model, aiurl, apikey, reqA, resp1, resp2, statusB) // 调用 kimi 检测是否越权 result, err = aiapis.AIScan(model, aiurl, apikey, reqA, resp1, resp2, statusB) // 调用 qianwen 检测是否越权
case "hunyuan": case "hunyuan":
model := "hunyuan-turbo" model := "hunyuan-turbo"
aiurl := "https://api.hunyuan.cloud.tencent.com/v1/chat/completions" aiurl := "https://api.hunyuan.cloud.tencent.com/v1/chat/completions"
@ -264,17 +264,17 @@ func detectPrivilegeEscalation(AI string, reqA, resp1, resp2, statusB string) (s
model := "glm-4-air" model := "glm-4-air"
aiurl := "https://open.bigmodel.cn/api/paas/v4/chat/completions" aiurl := "https://open.bigmodel.cn/api/paas/v4/chat/completions"
apikey := config.GetConfig().APIKeys.Glm apikey := config.GetConfig().APIKeys.Glm
result, err = aiapis.AIScan(model, aiurl, apikey, reqA, resp1, resp2, statusB) // 调用 hunyuan 检测是否越权 result, err = aiapis.AIScan(model, aiurl, apikey, reqA, resp1, resp2, statusB) // 调用 glm 检测是否越权
case "gpt": case "gpt":
model := "gpt-4o" model := "gpt-4o"
aiurl := "https://open.bigmodel.cn/api/paas/v4/chat/completions" aiurl := "https://open.bigmodel.cn/api/paas/v4/chat/completions"
apikey := config.GetConfig().APIKeys.Gpt apikey := config.GetConfig().APIKeys.Gpt
result, err = aiapis.AIScan(model, aiurl, apikey, reqA, resp1, resp2, statusB) // 调用 hunyuan 检测是否越权 result, err = aiapis.AIScan(model, aiurl, apikey, reqA, resp1, resp2, statusB) // 调用 gpt 检测是否越权
default: default:
model := "moonshot-v1-8k" model := "moonshot-v1-8k"
aiurl := "https://api.moonshot.cn/v1/chat/completions" aiurl := "https://api.moonshot.cn/v1/chat/completions"
apikey := config.GetConfig().APIKeys.Kimi apikey := config.GetConfig().APIKeys.Kimi
result, err = aiapis.AIScan(model, aiurl, apikey, reqA, resp1, resp2, statusB) // 调用 kimi 检测是否越权 result, err = aiapis.AIScan(model, aiurl, apikey, reqA, resp1, resp2, statusB) // 默认调用 kimi 检测是否越权
} }
if err != nil { if err != nil {