mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-22 16:55:27 +00:00
Misc
This commit is contained in:
parent
1976651890
commit
e8cadd86f1
@ -434,10 +434,15 @@ func (r *Request) executeRequest(reqURL string, request *generatedRequest, previ
|
|||||||
finalEvent := make(output.InternalEvent)
|
finalEvent := make(output.InternalEvent)
|
||||||
|
|
||||||
// Decode gbk response content-types
|
// Decode gbk response content-types
|
||||||
if contentTypes, ok := resp.Header["Content-Type"]; ok && len(contentTypes) > 0 && strings.Contains(contentTypes[0], "gbk") && strings.Contains(contentTypes[0], "gb2312") {
|
if contentTypes, ok := resp.Header["Content-Type"]; ok && len(contentTypes) > 0 {
|
||||||
dumpedResponse, err = decodegbk(dumpedResponse)
|
for _, value := range contentTypes {
|
||||||
if err != nil {
|
if strings.Contains(value, "gbk") && strings.Contains(value, "gb2312") {
|
||||||
return errors.Wrap(err, "could not store in project file")
|
dumpedResponse, err = decodegbk(dumpedResponse)
|
||||||
|
if err != nil {
|
||||||
|
return errors.Wrap(err, "could not store in project file")
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user