Class: Tinfoil::Scanner

Inherits:
Object
  • Object
show all
Defined in:
lib/tinfoil/scanner.rb

Instance Method Summary collapse

Instance Method Details

#scan(domain, options = OpenStruct.new) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/tinfoil/scanner.rb', line 7

def scan (domain, options = OpenStruct.new)
  @options = options
  server_result = {}

  [:http, :https].each do |protocol|
    unless options.ignore_protocols.include?(protocol.to_s)
      server_result[protocol] = call_server("#{protocol}://" + domain) || []
    end
  end

  return server_result
end