Class: Relyze::ExecutableFileModel::Segment
- Inherits:
-
Object
- Object
- Relyze::ExecutableFileModel::Segment
- Defined in:
- C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb
Instance Method Summary collapse
-
#executable? ⇒ true, false
Check if this segment is executable.
-
#execute ⇒ true, false
Check if this segment is executable.
-
#execute=(execute) ⇒ Object
Set this segment as executable.
-
#initialized_length ⇒ Integer
Get this segments initialized length in bytes.
-
#last_initialized_rva ⇒ Integer
Get this segments last initialized RVA location.
-
#last_rva ⇒ Integer
Get this segments last RVA location.
-
#length ⇒ Integer
Get this segments total length in bytes.
-
#model ⇒ Relyze::ExecutableFileModel
Get the Relyze::ExecutableFileModel which owns this segment.
-
#name ⇒ String
Get the segment name.
-
#name=(name) ⇒ Object
Set the segment name.
-
#offset2rva(offset) ⇒ Integer?
Convert a segment offset to an RVA location if possible.
-
#read ⇒ true, false
Check if this segment is readable.
-
#read=(read) ⇒ Object
Set this segment as readable.
-
#read_buffer(offset, length) ⇒ String?
Read some data from this segment.
-
#readable? ⇒ true, false
Check if this segment is readable.
-
#rva ⇒ Integer
Get this segments RVA within the model that owns it.
-
#rva2offset(rva) ⇒ Integer?
Convert an RVA location to a segment offset if possible.
-
#to_s ⇒ String
Get a simple description of this segment.
-
#uninitialized? ⇒ true, false
Check if this segment is entirely uninitialized.
-
#uninitialized_length ⇒ Integer
Get this segments uninitialised length in bytes.
-
#writable? ⇒ true, false
Check if this segment is writable.
-
#write ⇒ true, false
Check if this segment is writable.
-
#write=(write) ⇒ Object
Set this segment as writable.
-
#write_buffer(offset, buffer) ⇒ Integer?
Write some data to this segment.
Instance Method Details
#executable? ⇒ true, false
Check if this segment is executable.
792 793 794 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 792 def executable? return self.execute end |
#execute ⇒ true, false
Check if this segment is executable.
778 779 780 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 778 def execute return nil end |
#execute=(execute) ⇒ Object
Set this segment as executable.
785 786 787 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 785 def execute=( execute ) return nil end |
#initialized_length ⇒ Integer
Get this segments initialized length in bytes.
827 828 829 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 827 def initialized_length return 0 end |
#last_initialized_rva ⇒ Integer
Get this segments last initialized RVA location.
813 814 815 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 813 def last_initialized_rva return nil end |
#last_rva ⇒ Integer
Get this segments last RVA location.
806 807 808 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 806 def last_rva return nil end |
#length ⇒ Integer
Get this segments total length in bytes.
820 821 822 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 820 def length return 0 end |
#model ⇒ Relyze::ExecutableFileModel
Get the Relyze::ExecutableFileModel which owns this segment.
848 849 850 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 848 def model return nil end |
#name ⇒ String
Get the segment name
722 723 724 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 722 def name return nil end |
#name=(name) ⇒ Object
Set the segment name.
729 730 731 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 729 def name=( name ) return nil end |
#offset2rva(offset) ⇒ Integer?
Convert a segment offset to an RVA location if possible.
889 890 891 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 889 def offset2rva( offset ) return nil end |
#read ⇒ true, false
Check if this segment is readable.
736 737 738 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 736 def read return nil end |
#read=(read) ⇒ Object
Set this segment as readable.
743 744 745 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 743 def read=( read ) return nil end |
#read_buffer(offset, length) ⇒ String?
Read some data from this segment.
864 865 866 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 864 def read_buffer( offset, length ) return nil end |
#readable? ⇒ true, false
Check if this segment is readable.
750 751 752 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 750 def readable? return self.read end |
#rva ⇒ Integer
Get this segments RVA within the model that owns it.
799 800 801 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 799 def rva return nil end |
#rva2offset(rva) ⇒ Integer?
Convert an RVA location to a segment offset if possible.
881 882 883 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 881 def rva2offset( rva ) return nil end |
#to_s ⇒ String
Get a simple description of this segment.
855 856 857 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 855 def to_s return "Segment: %s (%s%s%s)" % [ self.name, (self.readable? ? 'R' : '-'), (self.writable? ? 'W' : '-'), (self.executable? ? 'X' : '-') ] end |
#uninitialized? ⇒ true, false
Check if this segment is entirely uninitialized.
841 842 843 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 841 def uninitialized? return false end |
#uninitialized_length ⇒ Integer
Get this segments uninitialised length in bytes.
834 835 836 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 834 def uninitialized_length return 0 end |
#writable? ⇒ true, false
Check if this segment is writable.
771 772 773 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 771 def writable? return self.write end |
#write ⇒ true, false
Check if this segment is writable.
757 758 759 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 757 def write return nil end |
#write=(write) ⇒ Object
Set this segment as writable.
764 765 766 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 764 def write=( write ) return nil end |
#write_buffer(offset, buffer) ⇒ Integer?
Write some data to this segment.
873 874 875 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 873 def write_buffer( offset, buffer ) return nil end |