Class: Rex::MachParsey::FatBase::FatArch
- Inherits:
-
GenericHeader
- Object
- GenericStruct
- GenericHeader
- Rex::MachParsey::FatBase::FatArch
- Defined in:
- lib/rex/machparsey/machbase.rb
Instance Attribute Summary collapse
-
#cpu_subtype ⇒ Object
Returns the value of attribute cpu_subtype.
-
#cpu_type ⇒ Object
Returns the value of attribute cpu_type.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#size ⇒ Object
Returns the value of attribute size.
Attributes inherited from GenericStruct
Instance Method Summary collapse
-
#initialize(rawdata, endian) ⇒ FatArch
constructor
A new instance of FatArch.
Methods inherited from GenericStruct
#[], #keys, #method_missing, #v
Constructor Details
#initialize(rawdata, endian) ⇒ FatArch
Returns a new instance of FatArch.
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
# File 'lib/rex/machparsey/machbase.rb', line 379 def initialize(rawdata, endian) if endian == ENDIAN_LSB fat_arch = FAT_ARCH_LSB.make_struct else fat_arch = FAT_ARCH_MSB.make_struct end if !fat_arch.from_s(rawdata) raise FatHeaderError, "Could not parse arch from FAT header" end self.cpu_type = fat_arch.v['cpu_type'] self.cpu_subtype = fat_arch.v['cpu_subtype'] self.offset = fat_arch.v['offset'] self.size = fat_arch.v['size'] self.struct = fat_arch end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Rex::MachParsey::GenericStruct
Instance Attribute Details
#cpu_subtype ⇒ Object
Returns the value of attribute cpu_subtype.
377 378 379 |
# File 'lib/rex/machparsey/machbase.rb', line 377 def cpu_subtype @cpu_subtype end |
#cpu_type ⇒ Object
Returns the value of attribute cpu_type.
377 378 379 |
# File 'lib/rex/machparsey/machbase.rb', line 377 def cpu_type @cpu_type end |
#offset ⇒ Object
Returns the value of attribute offset.
377 378 379 |
# File 'lib/rex/machparsey/machbase.rb', line 377 def offset @offset end |
#size ⇒ Object
Returns the value of attribute size.
377 378 379 |
# File 'lib/rex/machparsey/machbase.rb', line 377 def size @size end |