Sha256: e6c0180cddcbc5f3f41b2513c5aeb785a2bc3ff571b118e348f0e002e4c4b518

Contents?: true

Size: 714 Bytes

Versions: 1

Compression:

Stored size: 714 Bytes

Contents

module SSHScan
  module OS
    class Raspbian
      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

      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

      def version
        @version
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ssh_scan-0.0.16 lib/ssh_scan/os/raspbian.rb