Sha256: 283aff995f9bf644ed4d30d4c74a99b7c812c04c27f2064f2935d7b084bfb296

Contents?: true

Size: 685 Bytes

Versions: 31

Compression:

Stored size: 685 Bytes

Contents

module SSHScan
  module SSHLib
    class RomSShell
      class Version
        def initialize(version_string)
          @version_string = version_string
        end

        def to_s
          @version_string
        end
      end

      def initialize(banner = nil)
        @banner = banner
      end

      def version()
        return nil if @banner.nil?
        match = @banner.match(/RomSShell_(\d+[\.\d+]+(p)?(\d+)?)/)
        return nil if match.nil?
        return RomSShell::Version.new(match[1])
      end

      def common
        "romsshell"
      end

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

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
ssh_scan-0.0.25 lib/ssh_scan/ssh_lib/romsshell.rb
ssh_scan-0.0.24 lib/ssh_scan/ssh_lib/romsshell.rb
ssh_scan-0.0.23 lib/ssh_scan/ssh_lib/romsshell.rb
ssh_scan-0.0.22 lib/ssh_scan/ssh_lib/romsshell.rb
ssh_scan-0.0.21 lib/ssh_scan/ssh_lib/romsshell.rb
ssh_scan-0.0.20 lib/ssh_scan/ssh_lib/romsshell.rb
ssh_scan-0.0.19 lib/ssh_scan/ssh_lib/romsshell.rb
ssh_scan-0.0.18 lib/ssh_scan/ssh_lib/romsshell.rb
ssh_scan-0.0.17 lib/ssh_scan/ssh_lib/romsshell.rb
ssh_scan-0.0.17.pre lib/ssh_scan/ssh_lib/romsshell.rb
ssh_scan-0.0.16 lib/ssh_scan/ssh_lib/romsshell.rb