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.
307 308 309 310 311 312 313 314 315 316 317 |
# File 'lib/rex/exploitation/opcodedb.rb', line 307 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.
331 332 333 |
# File 'lib/rex/exploitation/opcodedb.rb', line 331 def arch @arch end |
#desc ⇒ Object (readonly)
The operating system version description, such as Windows XP 5.2.0.0 (IA32).
327 328 329 |
# File 'lib/rex/exploitation/opcodedb.rb', line 327 def desc @desc end |
#maj_patch_level ⇒ Object (readonly)
The major patch level of the operating system version, such as a service pack.
344 345 346 |
# File 'lib/rex/exploitation/opcodedb.rb', line 344 def maj_patch_level @maj_patch_level end |
#maj_ver ⇒ Object (readonly)
The major version of the operating system version.
335 336 337 |
# File 'lib/rex/exploitation/opcodedb.rb', line 335 def maj_ver @maj_ver end |
#min_patch_level ⇒ Object (readonly)
The minor patch level of the operating system version.
348 349 350 |
# File 'lib/rex/exploitation/opcodedb.rb', line 348 def min_patch_level @min_patch_level end |
#min_ver ⇒ Object (readonly)
The minor version of the operating system version.
339 340 341 |
# File 'lib/rex/exploitation/opcodedb.rb', line 339 def min_ver @min_ver end |
#modules ⇒ Object (readonly)
The number of modules that exist in this operating system version.
322 323 324 |
# File 'lib/rex/exploitation/opcodedb.rb', line 322 def modules @modules end |
Class Method Details
.hash_key(hash) ⇒ Object
302 303 304 |
# File 'lib/rex/exploitation/opcodedb.rb', line 302 def hash_key(hash) hash['id'] + (hash['modules'] || '') end |