Class: Rex::Exploitation::OpcodeDb::OsVersion
- Inherits:
-
Object
- Object
- Rex::Exploitation::OpcodeDb::OsVersion
- Extended by:
- Cachable
- Includes:
- DbEntry
- Defined in:
- lib/rex/exploitation/opcodedb.rb
Overview
This class contains information about a platform (operating system) version.
Instance Attribute Summary collapse
-
#arch ⇒ Object
readonly
The architecture that the operating system version runs on, such as IA32.
-
#desc ⇒ Object
readonly
The operating system version description, such as Windows XP 5.2.0.0 (IA32).
-
#maj_patch_level ⇒ Object
readonly
The major patch level of the operating system version, such as a service pack.
-
#maj_ver ⇒ Object
readonly
The major version of the operating system version.
-
#min_patch_level ⇒ Object
readonly
The minor patch level of the operating system version.
-
#min_ver ⇒ Object
readonly
The minor version of the operating system version.
-
#modules ⇒ Object
readonly
The number of modules that exist in this operating system version.
Attributes included from DbEntry
Attributes included from OpcodeResult
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash) ⇒ OsVersion
constructor
A new instance of OsVersion.
Methods included from Cachable
Methods included from DbEntry
Constructor Details
#initialize(hash) ⇒ OsVersion
Returns a new instance of OsVersion.
306 307 308 309 310 311 312 313 314 315 316 |
# File 'lib/rex/exploitation/opcodedb.rb', line 306 def initialize(hash) super @modules = (hash['modules']) ? hash['modules'].to_i : 0 @desc = hash['desc'] @arch = hash['arch'] @maj_ver = hash['maj_ver'].to_i @min_ver = hash['min_ver'].to_i @maj_patch_level = hash['maj_patch_level'].to_i @min_patch_level = hash['min_patch_level'].to_i end |
Instance Attribute Details
#arch ⇒ Object (readonly)
The architecture that the operating system version runs on, such as IA32.
330 331 332 |
# File 'lib/rex/exploitation/opcodedb.rb', line 330 def arch @arch end |
#desc ⇒ Object (readonly)
The operating system version description, such as Windows XP 5.2.0.0 (IA32).
326 327 328 |
# File 'lib/rex/exploitation/opcodedb.rb', line 326 def desc @desc end |
#maj_patch_level ⇒ Object (readonly)
The major patch level of the operating system version, such as a service pack.
343 344 345 |
# File 'lib/rex/exploitation/opcodedb.rb', line 343 def maj_patch_level @maj_patch_level end |
#maj_ver ⇒ Object (readonly)
The major version of the operating system version.
334 335 336 |
# File 'lib/rex/exploitation/opcodedb.rb', line 334 def maj_ver @maj_ver end |
#min_patch_level ⇒ Object (readonly)
The minor patch level of the operating system version.
347 348 349 |
# File 'lib/rex/exploitation/opcodedb.rb', line 347 def min_patch_level @min_patch_level end |
#min_ver ⇒ Object (readonly)
The minor version of the operating system version.
338 339 340 |
# File 'lib/rex/exploitation/opcodedb.rb', line 338 def min_ver @min_ver end |
#modules ⇒ Object (readonly)
The number of modules that exist in this operating system version.
321 322 323 |
# File 'lib/rex/exploitation/opcodedb.rb', line 321 def modules @modules end |
Class Method Details
.hash_key(hash) ⇒ Object
301 302 303 |
# File 'lib/rex/exploitation/opcodedb.rb', line 301 def hash_key(hash) hash['id'] + (hash['modules'] || '') end |