Sha256: 944bb6e681070de8ad3b526b17436de16ec1d31bbf3bd749f3c530c25e413ad5
Contents?: true
Size: 947 Bytes
Versions: 25
Compression:
Stored size: 947 Bytes
Contents
module SSHScan module OS class Raspbian attr_reader :version class Version def initialize(version_string) @version_string = version_string end def to_s @version_string end end def initialize(banner) @banner = banner @version = Raspbian::Version.new(raspbian_version_guess) end # Guess Raspbian OS version. Typically, Raspbian banners # are like "SSH-2.0-Raspbian-something", where something # is the Raspbian version. # @return [String] version string matched from banner, nil # if not matched def raspbian_version_guess return nil if @banner.nil? match = @banner.match(/SSH-2.0-Raspbian-(\d+)/) return nil if match.nil? return match[1] end def common "raspbian" end def cpe "o:raspbian:raspbian" end end end end
Version data entries
25 entries across 25 versions & 1 rubygems