Class: Rex::Exploitation::OpcodeDb::Type
- Inherits:
- 
      Object
      
        - Object
- Rex::Exploitation::OpcodeDb::Type
 
- Extended by:
- Cachable
- Includes:
- DbEntry
- Defined in:
- lib/rex/exploitation/opcodedb.rb
Overview
An opcode type (jmp esp).
Instance Attribute Summary collapse
- 
  
    
      #arch  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    The architecture that this opcode type is associated with. 
- 
  
    
      #group  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    An instance of the Group to which this opcode type belongs, or nil. 
- 
  
    
      #meta_type  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    An instance of the MetaType to which this opcode type belongs, or nil. 
- 
  
    
      #opcodes  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    The number of opcodes associated with this type, or 0 if this information is not available. 
Attributes included from DbEntry
Attributes included from OpcodeResult
Instance Method Summary collapse
- 
  
    
      #initialize(hash)  ⇒ Type 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Type. 
Methods included from Cachable
Methods included from DbEntry
Constructor Details
#initialize(hash) ⇒ Type
Returns a new instance of Type.
| 375 376 377 378 379 380 381 382 | # File 'lib/rex/exploitation/opcodedb.rb', line 375 def initialize(hash) super @opcodes = (hash['opcodes']) ? hash['opcodes'].to_i : 0 = MetaType.create(hash['meta_type']) if (hash['meta_type']) @group = Group.create(hash['group']) if (hash['group']) @arch = hash['arch'] end | 
Instance Attribute Details
#arch ⇒ Object (readonly)
The architecture that this opcode type is associated with.
| 400 401 402 | # File 'lib/rex/exploitation/opcodedb.rb', line 400 def arch @arch end | 
#group ⇒ Object (readonly)
An instance of the Group to which this opcode type belongs, or nil.
| 396 397 398 | # File 'lib/rex/exploitation/opcodedb.rb', line 396 def group @group end | 
#meta_type ⇒ Object (readonly)
An instance of the MetaType to which this opcode type belongs, or nil.
| 392 393 394 | # File 'lib/rex/exploitation/opcodedb.rb', line 392 def end | 
#opcodes ⇒ Object (readonly)
The number of opcodes associated with this type, or 0 if this information is not available.
| 388 389 390 | # File 'lib/rex/exploitation/opcodedb.rb', line 388 def opcodes @opcodes end |