16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/aikido/zen/sinks/resolv.rb', line 16
def each_address(name, &block)
addresses = []
super do |address|
addresses << address
yield address
end
ensure
if (context = Aikido::Zen.current_context)
context["dns.lookups"] ||= Aikido::Zen::Scanners::SSRF::DNSLookups.new
context["dns.lookups"].add(name, addresses)
end
SINK.scan(
hostname: name,
addresses: addresses,
request: context && context["ssrf.request"],
operation: "lookup"
)
end
|