Class: Relyze::ExecutableFileModel::Segment

Inherits:
Object
  • Object
show all
Defined in:
C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb

Instance Method Summary collapse

Instance Method Details

#executable?true, false

Check if this segment is executable.

Returns:

  • (true, false)


792
793
794
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 792

def executable?
    return self.execute
end

#executetrue, false

Check if this segment is executable.

Returns:

  • (true, false)


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.

Parameters:

  • execute (true, false)


785
786
787
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 785

def execute=( execute )
    return nil
end

#initialized_lengthInteger

Get this segments initialized length in bytes.

Returns:



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_rvaInteger

Get this segments last initialized RVA location.

Returns:



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_rvaInteger

Get this segments last RVA location.

Returns:



806
807
808
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 806

def last_rva
    return nil
end

#lengthInteger

Get this segments total length in bytes.

Returns:



820
821
822
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 820

def length
    return 0
end

#modelRelyze::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

#nameString

Get the segment name

Returns:

  • (String)

    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.

Parameters:

  • name (String)

    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.

Parameters:

  • offset (Integer)

    An offset in this segment

Returns:

  • (Integer, nil)

    An RVA location corresponding to the given offset in this segment, or nil on failure.



889
890
891
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 889

def offset2rva( offset )
    return nil
end

#readtrue, false

Check if this segment is readable.

Returns:

  • (true, false)


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.

Parameters:

  • read (true, false)


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.

Parameters:

  • offset (Integer)

    An offset into this segment to read from.

  • length (Integer)

    The number of bytes to read.

Returns:

  • (String, nil)

    The read data or nil on failure.



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.

Returns:

  • (true, false)


750
751
752
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 750

def readable?
    return self.read
end

#rvaInteger

Get this segments RVA within the model that owns it.

Returns:



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.

Parameters:

  • rva (Integer)

    An RVA location in this segment.

Returns:

  • (Integer, nil)

    An offset in this segment corresponding to the given RVA location, or nil on failure.



881
882
883
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 881

def rva2offset( rva )
    return nil
end

#to_sString

Get a simple description of this segment.

Returns:

  • (String)

    This segments description.



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.

Returns:

  • (true, false)


841
842
843
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 841

def uninitialized?
    return false
end

#uninitialized_lengthInteger

Get this segments uninitialised length in bytes.

Returns:



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.

Returns:

  • (true, false)


771
772
773
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 771

def writable?
    return self.write
end

#writetrue, false

Check if this segment is writable.

Returns:

  • (true, false)


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.

Parameters:

  • write (true, false)


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.

Parameters:

  • offset (Integer)

    An offset into this segment to write to.

  • buffer (String)

    The data to write.

Returns:

  • (Integer, nil)

    Nil on failure or else the number of bytes written.



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
9 11:52:00 2022 by yard 0.9.20 (ruby-2.6.5).