MCPcopy
hub / github.com/dreadl0ck/netcap / searchForBasicAuth

Method searchForBasicAuth

decoder/stream/http/http_reader.go:185–197  ·  view source on GitHub ↗

search request header field for HTTP basic auth.

(req *http.Request)

Source from the content-addressed store, hash-verified

183
184// search request header field for HTTP basic auth.
185func (h *httpReader) searchForBasicAuth(req *http.Request) {
186 if u, p, ok := req.BasicAuth(); ok {
187 if u != "" || p != "" {
188 secret.WriteSecret(&types.Secret{
189 Timestamp: h.conversation.FirstClientPacket.UnixNano(),
190 Service: "HTTP Basic Auth",
191 Flow: h.conversation.Ident,
192 User: u,
193 Password: p,
194 })
195 }
196 }
197}
198
199// search for user name and password in http url params and body params.
200func (h *httpReader) searchForLoginParams(req *http.Request) {

Callers 1

DecodeMethod · 0.95

Calls 1

WriteSecretFunction · 0.92

Tested by

no test coverage detected