Class: Rex::Exploitation::OpcodeDb::ImageModule::Segment
- Inherits:
-
Object
- Object
- Rex::Exploitation::OpcodeDb::ImageModule::Segment
- Defined in:
- lib/rex/exploitation/opcodedb.rb
Overview
This class contains information about a module-associated segment.
Instance Attribute Summary collapse
-
#base_address ⇒ Object
readonly
The base address of the segment.
-
#executable ⇒ Object
readonly
Boolean that indicates whether or not the segment is executable.
-
#readable ⇒ Object
readonly
Boolean that indicates whether or not the segment is readable.
-
#size ⇒ Object
readonly
The size of the segment in bytes.
-
#type ⇒ Object
readonly
The type of the segment, such as “.text”.
-
#writable ⇒ Object
readonly
Boolean that indicates whether or not the segment is writable.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Segment
constructor
A new instance of Segment.
Constructor Details
#initialize(hash) ⇒ Segment
Returns a new instance of Segment.
96 97 98 99 100 101 102 103 |
# File 'lib/rex/exploitation/opcodedb.rb', line 96 def initialize(hash) @type = hash['type'] @base_address = hash['base_address'].to_i @size = hash['segment_size'].to_i @writable = hash['writable'] == "true" ? true : false @readable = hash['readable'] == "true" ? true : false @executable = hash['executable'] == "true" ? true : false end |
Instance Attribute Details
#base_address ⇒ Object (readonly)
The base address of the segment.
112 113 114 |
# File 'lib/rex/exploitation/opcodedb.rb', line 112 def base_address @base_address end |
#executable ⇒ Object (readonly)
Boolean that indicates whether or not the segment is executable.
128 129 130 |
# File 'lib/rex/exploitation/opcodedb.rb', line 128 def executable @executable end |
#readable ⇒ Object (readonly)
Boolean that indicates whether or not the segment is readable.
124 125 126 |
# File 'lib/rex/exploitation/opcodedb.rb', line 124 def readable @readable end |
#size ⇒ Object (readonly)
The size of the segment in bytes.
116 117 118 |
# File 'lib/rex/exploitation/opcodedb.rb', line 116 def size @size end |
#type ⇒ Object (readonly)
The type of the segment, such as “.text”.
108 109 110 |
# File 'lib/rex/exploitation/opcodedb.rb', line 108 def type @type end |
#writable ⇒ Object (readonly)
Boolean that indicates whether or not the segment is writable.
120 121 122 |
# File 'lib/rex/exploitation/opcodedb.rb', line 120 def writable @writable end |