Module: Aikido::Zen::Sinks::EventMachine::HttpRequest::Extensions

Defined in:
lib/aikido/zen/sinks/em_http.rb

Instance Method Summary collapse

Instance Method Details

#send_requestObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/aikido/zen/sinks/em_http.rb', line 16

def send_request(*)
  wrapped_request = Aikido::Zen::Scanners::SSRFScanner::Request.new(
    verb: req.method.to_s,
    uri: URI(req.uri),
    headers: req.headers
  )

  # Store the request information so the DNS sinks can pick it up.
  context = Aikido::Zen.current_context
  context["ssrf.request"] = wrapped_request if context

  SINK.scan(
    connection: Aikido::Zen::OutboundConnection.new(
      host: req.host,
      port: req.port
    ),
    request: wrapped_request,
    operation: "request"
  )

  super
end