class SSHScan::SSHLib::OpenSSH
Public Class Methods
new(banner = nil)
click to toggle source
# File lib/ssh_scan/ssh_lib/openssh.rb, line 14 def initialize(banner = nil) @banner = banner end
Public Instance Methods
common()
click to toggle source
# File lib/ssh_scan/ssh_lib/openssh.rb, line 25 def common "openssh" end
cpe()
click to toggle source
# File lib/ssh_scan/ssh_lib/openssh.rb, line 29 def cpe "a:openssh:openssh" << (":" + version.to_s) unless version.nil? end
version()
click to toggle source
# File lib/ssh_scan/ssh_lib/openssh.rb, line 18 def version() return nil if @banner.nil? match = @banner.match(/OpenSSH_(\d+[\.\d+]+(p)?(\d+)?)/) return nil if match.nil? return OpenSSH::Version.new(match[1]) end