class SSHScan::SSHLib::IpSsh

Public Class Methods

new(banner = nil) click to toggle source
# File lib/ssh_scan/ssh_lib/ipssh.rb, line 14
def initialize(banner = nil)
  @banner = banner
end

Public Instance Methods

common() click to toggle source
# File lib/ssh_scan/ssh_lib/ipssh.rb, line 25
def common
  "ipssh"
end
cpe() click to toggle source
# File lib/ssh_scan/ssh_lib/ipssh.rb, line 29
def cpe
  "a:ipssh:ipssh" << (":" + version.to_s) unless version.nil?
end
version() click to toggle source
# File lib/ssh_scan/ssh_lib/ipssh.rb, line 18
def version()
  return nil if @banner.nil?
  match = @banner.match(/IPSSH-(\d+[\.\d+]+(p)?(\d+)?)/)
  return nil if match.nil?
  return IpSsh::Version.new(match[1])
end