Sha256: 91852773e057adc6c68433d0f13c82f8a420262934eb2fd97b80ac3af45537ab

Contents?: true

Size: 877 Bytes

Versions: 30

Compression:

Stored size: 877 Bytes

Contents

module SSHScan
  module SSHLib
    class Dropbear
      attr_reader :version

      class Version
        def initialize(version_string)
          if version_string == nil
            @version_string = "unknown"
          else
            @version_string = version_string
          end
        end
        def to_s
          @version_string
        end
      end

      def initialize(banner)
        @banner = banner
        @version = Dropbear::Version.new(dropbear_version_guess)
      end

      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

      def common
        "dropbear"
      end

      def cpe
        "a:dropbear:dropbear" << (":" + version.to_s) unless version.nil?
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
ssh_scan-0.0.44 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.43 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.42 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.41 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.40 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.39 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.38 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.38.pre lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.37 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.36 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.35 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.34 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.33 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.32 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.31 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.30 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.29 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.28 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.27 lib/ssh_scan/ssh_lib/dropbear.rb
ssh_scan-0.0.26 lib/ssh_scan/ssh_lib/dropbear.rb