Class: Rex::Exploitation::OpcodeDb::Statistics

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/exploitation/opcodedb.rb

Overview

Current statistics of the opcode database.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Statistics

Returns a new instance of Statistics.



463
464
465
466
467
468
469
470
471
472
473
# File 'lib/rex/exploitation/opcodedb.rb', line 463

def initialize(hash)
	@modules         = hash['modules'].to_i
	@opcodes         = hash['opcodes'].to_i
	@opcode_types    = hash['opcode_types'].to_i
	@platforms       = hash['platforms'].to_i
	@architectures   = hash['architectures'].to_i
	@module_segments = hash['module_segments'].to_i
	@module_imports  = hash['module_imports'].to_i
	@module_exports  = hash['module_exports'].to_i
	@last_update     = Time.at(hash['last_update'].to_i)
end

Instance Attribute Details

#architecturesObject (readonly)

The number of architectures supported by the database.



494
495
496
# File 'lib/rex/exploitation/opcodedb.rb', line 494

def architectures
  @architectures
end

#last_updateObject (readonly)

The time at which the last database update occurred.



510
511
512
# File 'lib/rex/exploitation/opcodedb.rb', line 510

def last_update
  @last_update
end

#module_exportsObject (readonly)

The number of module exports supported by the database.



506
507
508
# File 'lib/rex/exploitation/opcodedb.rb', line 506

def module_exports
  @module_exports
end

#module_importsObject (readonly)

The number of module imports supported by the database.



502
503
504
# File 'lib/rex/exploitation/opcodedb.rb', line 502

def module_imports
  @module_imports
end

#module_segmentsObject (readonly)

The number of module segments supported by the database.



498
499
500
# File 'lib/rex/exploitation/opcodedb.rb', line 498

def module_segments
  @module_segments
end

#modulesObject (readonly)

The number of modules found within the opcode database.



478
479
480
# File 'lib/rex/exploitation/opcodedb.rb', line 478

def modules
  @modules
end

#opcode_typesObject (readonly)

The number of opcode types supported by the database.



486
487
488
# File 'lib/rex/exploitation/opcodedb.rb', line 486

def opcode_types
  @opcode_types
end

#opcodesObject (readonly)

The number of opcodes supported by the opcode database.



482
483
484
# File 'lib/rex/exploitation/opcodedb.rb', line 482

def opcodes
  @opcodes
end

#platformsObject (readonly)

The number of platforms supported by the database.



490
491
492
# File 'lib/rex/exploitation/opcodedb.rb', line 490

def platforms
  @platforms
end