Class: Rex::Exploitation::OpcodeDb::Opcode
- Inherits:
-
Object
- Object
- Rex::Exploitation::OpcodeDb::Opcode
- Includes:
- DbEntry
- Defined in:
- lib/rex/exploitation/opcodedb.rb
Overview
An opcode that has a specific address and is associated with one or more modules.
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
The address of the opcode.
-
#group ⇒ Object
readonly
A Group instance that reflects the group to which the opcode type found at the instance’s address belongs.
-
#modules ⇒ Object
readonly
An array of ImageModule instances that show the modules that contain this address.
-
#type ⇒ Object
readonly
The type of the opcode indicating which instruction is found at the address.
Attributes included from DbEntry
Attributes included from OpcodeResult
Instance Method Summary collapse
-
#initialize(hash) ⇒ Opcode
constructor
A new instance of Opcode.
Methods included from DbEntry
Constructor Details
#initialize(hash) ⇒ Opcode
Returns a new instance of Opcode.
423 424 425 426 427 428 429 430 431 432 433 434 |
# File 'lib/rex/exploitation/opcodedb.rb', line 423 def initialize(hash) super @address = hash['address'].to_i @type = Type.create(hash['type']) @group = @type.group @modules = hash['modules'].map { |ent| ImageModule.create(ent) } if (hash['modules']) @modules = [] unless(@modules) end |
Instance Attribute Details
#address ⇒ Object (readonly)
The address of the opcode.
439 440 441 |
# File 'lib/rex/exploitation/opcodedb.rb', line 439 def address @address end |
#group ⇒ Object (readonly)
A Group instance that reflects the group to which the opcode type found at the instance’s address belongs.
449 450 451 |
# File 'lib/rex/exploitation/opcodedb.rb', line 449 def group @group end |
#modules ⇒ Object (readonly)
An array of ImageModule instances that show the modules that contain this address.
454 455 456 |
# File 'lib/rex/exploitation/opcodedb.rb', line 454 def modules @modules end |
#type ⇒ Object (readonly)
The type of the opcode indicating which instruction is found at the address. This is an instance of the Type class.
444 445 446 |
# File 'lib/rex/exploitation/opcodedb.rb', line 444 def type @type end |