You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ifstrings.Contains(Config.ReasonTypes, "header") &&header!=nil&&poison!=""&&poison!="http"&&poison!="https"&&poison!="nothttps"&&poison!="1" { // dont check for reflection of http/https/nothttps (used by forwarded headers), 1 (used by DOS) or empty poison
returnheadersWithPoison// no response splitting header found, return empty slice
73
+
}
74
+
// Other checks
75
+
} else {
62
76
63
-
ifrepCheck.Reason=="" {
64
-
// check for reflection in body
65
-
ifstrings.Contains(Config.ReasonTypes, "body") &&poison!=""&&poison!="http"&&poison!="https"&&poison!="nothttps"&&poison!="1"&&strings.Contains(body, poison) { // dont check for reflection of http/https/nothttps (used by forwarded headers), 1 (used by DOS) or empty poison
66
-
repCheck.Reason=fmt.Sprintf("Reflection Body: Response Body contained poison value %s %d times", poison, strings.Count(body, poison))
PrintVerbose("Skipped Status Code "+strconv.Itoa(status)+"\n", Cyan, 1) // TODO is it necessary to check if default status code changed?
77
-
returnheadersWithPoison
77
+
ifstrings.Contains(Config.ReasonTypes, "header") &&header!=nil&&poison!=""&&poison!="http"&&poison!="https"&&poison!="nothttps"&&poison!="1" { // dont check for reflection of http/https/nothttps (used by forwarded headers), 1 (used by DOS) or empty poison
Print(fmt.Sprintln("Status Code", statusCode1, "differed from the default", Config.Website.StatusCode, ", sending verification request", i+1, "from up to 3"), Yellow)
Print(fmt.Sprintln("The verification request returned the Status Code", tmpWebsite.StatusCode), Yellow)
92
-
break
88
+
ifrepCheck.Reason=="" {
89
+
// check for reflection in body
90
+
ifstrings.Contains(Config.ReasonTypes, "body") &&poison!=""&&poison!="http"&&poison!="https"&&poison!="nothttps"&&poison!="1"&&strings.Contains(body, poison) { // dont check for reflection of http/https/nothttps (used by forwarded headers), 1 (used by DOS) or empty poison
91
+
iflen(headersWithPoison) >0 {
92
+
repCheck.Reason=fmt.Sprintf("Reflection Body and Header: Response Body contained poison value %s %d times and Response Header(s) %s contained poison value %s", poison, strings.Count(body, poison), strings.Join(headersWithPoison, ", "), poison)
93
+
} else {
94
+
repCheck.Reason=fmt.Sprintf("Reflection Body: Response Body contained poison value %s %d times", poison, strings.Count(body, poison))
PrintVerbose("Skipped Status Code "+strconv.Itoa(status)+"\n", Cyan, 1) // TODO is it necessary to check if default status code changed?
108
+
returnheadersWithPoison
93
109
}
94
110
}
95
-
iferr!=nil {
96
-
repResult.HasError=true
97
-
msg:=fmt.Sprintf("%s: couldn't verify if status code %d is the new default status code, because the verification encountered the following error %d times: %s", repCheck.URL, statusCode1, count, err.Error())
Print(fmt.Sprintln("Status Code", statusCode1, "differed from the default", Config.Website.StatusCode, ", sending verification request", i+1, "from up to 3"), Yellow)
Print(fmt.Sprintln("The verification request returned the Status Code", tmpWebsite.StatusCode), Yellow)
123
+
break
124
+
}
125
+
}
126
+
iferr!=nil {
127
+
repResult.HasError=true
128
+
msg:=fmt.Sprintf("%s: couldn't verify if status code %d is the new default status code, because the verification encountered the following error %d times: %s", repCheck.URL, statusCode1, count, err.Error())
msg:=fmt.Sprintf("%s: couldn't verify if body length %d is the new default body length, because the verification request encountered the following error %d times: %s", repCheck.URL, statusCode1, count, err.Error())
msg:=fmt.Sprintf("%s: couldn't verify if body length %d is the new default body length, because the verification request encountered the following error %d times: %s", repCheck.URL, statusCode1, count, err.Error())
repCheck.Reason=fmt.Sprintf("Changed Content Length: Length %d differed more than %d bytes from normal length %d", len(body), Config.CLDiff, len(Config.Website.Body))
repCheck.Reason=fmt.Sprintf("Changed Content Length: Length %d differed more than %d bytes from normal length %d", len(body), Config.CLDiff, len(Config.Website.Body))
0 commit comments