class SSHScan::SSHLib::Dropbear

Attributes

version[R]

Public Class Methods

new(banner) click to toggle source
# File lib/ssh_scan/ssh_lib/dropbear.rb, line 19
def initialize(banner)
  @banner = banner
  @version = Dropbear::Version.new(dropbear_version_guess)
end

Public Instance Methods

common() click to toggle source
# File lib/ssh_scan/ssh_lib/dropbear.rb, line 31
def common
  "dropbear"
end
cpe() click to toggle source
# File lib/ssh_scan/ssh_lib/dropbear.rb, line 35
def cpe
  "a:dropbear:dropbear" << (":" + version.to_s) unless version.nil?
end
dropbear_version_guess() click to toggle source
# File lib/ssh_scan/ssh_lib/dropbear.rb, line 24
def dropbear_version_guess
  return nil if @banner.nil?
  match = @banner.match(/SSH-2.0-dropbear_(\d+.\d+(?:.\d)?(?:test(:?\d)?)?)/)
  return nil if match.nil?
  return match[1]
end