MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / get_section_by_offset

Method get_section_by_offset

pythonmemorymodule/pefile.py:6031–6038  ·  view source on GitHub ↗

Get the section containing the given file offset.

(self, offset)

Source from the content-addressed store, hash-verified

6029 return b(s.encode("utf-8", "backslashreplace_"))
6030
6031 def get_section_by_offset(self, offset):
6032 """Get the section containing the given file offset."""
6033
6034 for section in self.sections:
6035 if section.contains_offset(offset):
6036 return section
6037
6038 return None
6039
6040 def get_section_by_rva(self, rva):
6041 """Get the section containing the given address."""

Callers 2

get_rva_from_offsetMethod · 0.95

Calls 1

contains_offsetMethod · 0.80

Tested by

no test coverage detected