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

Method get_bytes_from_data

pythonmemorymodule/pefile.py:5971–5978  ·  view source on GitHub ↗

.

(self, offset, data)

Source from the content-addressed store, hash-verified

5969 return self.get_string_from_data(0, s.get_data(rva, length=max_length))
5970
5971 def get_bytes_from_data(self, offset, data):
5972 """."""
5973 if offset > len(data):
5974 return b""
5975 d = data[offset:]
5976 if isinstance(d, bytearray):
5977 return bytes(d)
5978 return d
5979
5980 def get_string_from_data(self, offset, data):
5981 """Get an ASCII string from data."""

Callers 1

get_string_from_dataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected