mirror of
https://github.com/Ed1s0nZ/PrivHunterAI.git
synced 2025-09-18 04:51:54 +00:00
Update scan.go
This commit is contained in:
parent
a732af55c7
commit
5184c53628
8
scan.go
8
scan.go
@ -123,7 +123,7 @@ func sendHTTPAndKimi(r *RequestResponseLog) (result string, respA string, respB
|
|||||||
Path: r.Request.URL.Path,
|
Path: r.Request.URL.Path,
|
||||||
RawQuery: r.Request.URL.RawQuery,
|
RawQuery: r.Request.URL.RawQuery,
|
||||||
}
|
}
|
||||||
|
fmt.Println(fullURL)
|
||||||
if isNotSuffix(r.Request.URL.Path, config.GetConfig().Suffixes) && !containsString(r.Response.Header.Get("Content-Type"), config.GetConfig().AllowedRespHeaders) {
|
if isNotSuffix(r.Request.URL.Path, config.GetConfig().Suffixes) && !containsString(r.Response.Header.Get("Content-Type"), config.GetConfig().AllowedRespHeaders) {
|
||||||
|
|
||||||
req, err := http.NewRequest(r.Request.Method, fullURL.String(), strings.NewReader(string(r.Request.Body)))
|
req, err := http.NewRequest(r.Request.Method, fullURL.String(), strings.NewReader(string(r.Request.Body)))
|
||||||
@ -157,7 +157,7 @@ func sendHTTPAndKimi(r *RequestResponseLog) (result string, respA string, respB
|
|||||||
resp2 := string(bodyBytes)
|
resp2 := string(bodyBytes)
|
||||||
|
|
||||||
if len(resp1+resp2) < 65535 {
|
if len(resp1+resp2) < 65535 {
|
||||||
|
if !MatchString(config.GetConfig().RespBodyBWhiteList, resp2) {
|
||||||
// 初始值
|
// 初始值
|
||||||
var resultDetect string
|
var resultDetect string
|
||||||
var detectErr error
|
var detectErr error
|
||||||
@ -178,6 +178,10 @@ func sendHTTPAndKimi(r *RequestResponseLog) (result string, respA string, respB
|
|||||||
}
|
}
|
||||||
|
|
||||||
return resultDetect, resp1, resp2, nil
|
return resultDetect, resp1, resp2, nil
|
||||||
|
} else {
|
||||||
|
return `{"res": "false", "reason": "匹配到关键字,判断为无越权(未消耗AI tokens)"}`, resp1, resp2, nil
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return `{"res": "white", "reason": "请求包太大"}`, resp1, resp2, nil
|
return `{"res": "white", "reason": "请求包太大"}`, resp1, resp2, nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user