MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / read32

Method read32

python/binaryview.py:10274–10294  ·  view source on GitHub ↗

``read32`` returns a four byte integer from offset incrementing the offset by four, using specified endianness. :param int address: offset to set the internal offset before reading :return: a four byte integer at offset. :rtype: int, or None on failure :Example: >>> br.seek(0x1000000

(self, address: Optional[int] = None)

Source from the content-addressed store, hash-verified

10272 return result.value
10273
10274 def read32(self, address: Optional[int] = None) -> Optional[int]:
10275 """
10276 ``read32`` returns a four byte integer from offset incrementing the offset by four, using specified endianness.
10277
10278 :param int address: offset to set the internal offset before reading
10279 :return: a four byte integer at offset.
10280 :rtype: int, or None on failure
10281 :Example:
10282
10283 >>> br.seek(0x100000000)
10284 >>> hex(br.read32())
10285 '0xfeedfacfL'
10286 >>>
10287 """
10288 if address is not None:
10289 self.seek(address)
10290
10291 result = ctypes.c_uint()
10292 if not core.BNRead32(self._handle, result):
10293 return None
10294 return result.value
10295
10296 def read64(self, address: Optional[int] = None) -> Optional[int]:
10297 """

Callers

nothing calls this directly

Calls 1

seekMethod · 0.95

Tested by

no test coverage detected