Class: SSLScan::Commands::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/ssl_scan/commands/command.rb

Direct Known Subclasses

Host, OnlyCertainSSL, Targets

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCommand

Returns a new instance of Command.



6
7
8
# File 'lib/ssl_scan/commands/command.rb', line 6

def initialize
  @results = []
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/ssl_scan/commands/command.rb', line 4

def options
  @options
end

#resultsObject

Returns the value of attribute results.



4
5
6
# File 'lib/ssl_scan/commands/command.rb', line 4

def results
  @results
end

Instance Method Details

#display_ciphers(scanner = nil) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/ssl_scan/commands/command.rb', line 19

def display_ciphers(scanner=nil)
  printf "\nSupported Server Cipher(s):\n"
  scanner.scan do |ssl_version, cipher_name, alg_length, status|
    unless options.no_failed && status == :failed
      printf "%12s %10s %10s %s\n", status, ssl_version, "#{alg_length} bits",  cipher_name
    end
  end
  scanner
end

#display_header(host, port = 443) ⇒ Object

Display Methods



15
16
17
# File 'lib/ssl_scan/commands/command.rb', line 15

def display_header(host, port=443)
  printf "\nTesting SSL server #{host} on port #{port}"
end

#executeObject



10
11
12
# File 'lib/ssl_scan/commands/command.rb', line 10

def execute
  raise "Implement"
end