MCPcopy Create free account
hub / github.com/Hackmanit/Web-Cache-Vulnerability-Scanner / clte

Function clte

pkg/request_smuggling.go:82–100  ·  view source on GitHub ↗

* Run clte before tecl. Dont test for tecl if clte already works! */

(path string, headers string)

Source from the content-addressed store, hash-verified

80
81/* Run clte before tecl. Dont test for tecl if clte already works! */
82func clte(path string, headers string) string {
83 httpMethod := "POST"
84 if Config.Website.Cache.CBisHTTPMethod {
85 httpMethod = Config.Website.Cache.CBName
86 }
87 payload := fmt.Sprintf(""+
88 "%s %s HTTP/1.1\r\n"+ // POST /about HTTP/1.1
89 "Host: %s\r\n"+ // Host: example.com
90 "%s"+ // *Additional Headers generated*
91 "Transfer-Encoding: chunked\r\n"+ // Transfer-Encoding: chunked
92 "Content-Length: 4\r\n"+ // Content-Length: 4
93 "\r\n"+ //
94 "1\r\n"+ // 1
95 "Z\r\n"+ // Z
96 "Q"+ // Q
97 "", httpMethod, path, Config.Website.Url.Host, headers)
98
99 return payload
100}
101
102func tecl(path string, headers string) string {
103 httpMethod := "POST"

Callers 1

ScanHTTPRequestSmugglingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected