class SSHScan::OS::Raspbian
Attributes
version[R]
Public Class Methods
new(banner)
click to toggle source
# File lib/ssh_scan/os/raspbian.rb, line 16 def initialize(banner) @banner = banner @version = Raspbian::Version.new(raspbian_version_guess) end
Public Instance Methods
common()
click to toggle source
# File lib/ssh_scan/os/raspbian.rb, line 33 def common "raspbian" end
cpe()
click to toggle source
# File lib/ssh_scan/os/raspbian.rb, line 37 def cpe "o:raspbian:raspbian" end
raspbian_version_guess()
click to toggle source
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
# File lib/ssh_scan/os/raspbian.rb, line 26 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