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.
97 98 99 100 101 102 103 104 |
# File 'lib/rex/exploitation/opcodedb.rb', line 97 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.
113 114 115 |
# File 'lib/rex/exploitation/opcodedb.rb', line 113 def base_address @base_address end |
#executable ⇒ Object (readonly)
Boolean that indicates whether or not the segment is executable.
129 130 131 |
# File 'lib/rex/exploitation/opcodedb.rb', line 129 def executable @executable end |
#readable ⇒ Object (readonly)
Boolean that indicates whether or not the segment is readable.
125 126 127 |
# File 'lib/rex/exploitation/opcodedb.rb', line 125 def readable @readable end |
#size ⇒ Object (readonly)
The size of the segment in bytes.
117 118 119 |
# File 'lib/rex/exploitation/opcodedb.rb', line 117 def size @size end |
#type ⇒ Object (readonly)
The type of the segment, such as “.text”.
109 110 111 |
# File 'lib/rex/exploitation/opcodedb.rb', line 109 def type @type end |
#writable ⇒ Object (readonly)
Boolean that indicates whether or not the segment is writable.
121 122 123 |
# File 'lib/rex/exploitation/opcodedb.rb', line 121 def writable @writable end |