Method: Rex::SSLScan::Scanner#valid?

Defined in:
lib/rex/sslscan/scanner.rb

#valid?Boolean

Checks whether the scanner option has a valid configuration

Returns:

  • (Boolean)

    True or False, the configuration is valid.



39
40
41
42
43
44
45
46
47
48
49
# File 'lib/rex/sslscan/scanner.rb', line 39

def valid?
  begin
    @host = Rex::Socket.getaddress(@host, true)
  rescue
    return false
  end
  return false unless @port.kind_of? Fixnum
  return false unless @port >= 0 and @port <= 65535
  return false unless @timeout.kind_of? Fixnum
  return true
end