Class: SSHScan::SSHLib::Dropbear
- Inherits:
-
Object
- Object
- SSHScan::SSHLib::Dropbear
- Defined in:
- lib/ssh_scan/ssh_lib/dropbear.rb
Defined Under Namespace
Classes: Version
Instance Attribute Summary collapse
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #common ⇒ Object
- #cpe ⇒ Object
- #dropbear_version_guess ⇒ Object
-
#initialize(banner) ⇒ Dropbear
constructor
A new instance of Dropbear.
Constructor Details
Instance Attribute Details
#version ⇒ Object (readonly)
Returns the value of attribute version.
4 5 6 |
# File 'lib/ssh_scan/ssh_lib/dropbear.rb', line 4 def version @version end |
Instance Method Details
#common ⇒ Object
31 32 33 |
# File 'lib/ssh_scan/ssh_lib/dropbear.rb', line 31 def common "dropbear" end |
#cpe ⇒ Object
35 36 37 |
# File 'lib/ssh_scan/ssh_lib/dropbear.rb', line 35 def cpe "a:dropbear:dropbear" << (":" + version.to_s) unless version.nil? end |
#dropbear_version_guess ⇒ Object
24 25 26 27 28 29 |
# File 'lib/ssh_scan/ssh_lib/dropbear.rb', line 24 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 |