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

Method read32le

python/binaryview.py:10340–10360  ·  view source on GitHub ↗

``read32le`` returns a four byte little endian integer from offset incrementing the offset by four. :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(0x100000000) >>> h

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

Source from the content-addressed store, hash-verified

10338 return struct.unpack("<H", result)[0]
10339
10340 def read32le(self, address: Optional[int] = None) -> Optional[int]:
10341 """
10342 ``read32le`` returns a four byte little endian integer from offset incrementing the offset by four.
10343
10344 :param int address: offset to set the internal offset before reading
10345 :return: a four byte integer at offset.
10346 :rtype: int, or None on failure
10347 :Example:
10348
10349 >>> br.seek(0x100000000)
10350 >>> hex(br.read32le())
10351 '0xfeedfacf'
10352 >>>
10353 """
10354 if address is not None:
10355 self.seek(address)
10356
10357 result = self.read(4)
10358 if (result is None) or (len(result) != 4):
10359 return None
10360 return struct.unpack("<I", result)[0]
10361
10362 def read64le(self, address: Optional[int] = None) -> Optional[int]:
10363 """

Callers

nothing calls this directly

Calls 2

seekMethod · 0.95
readMethod · 0.95

Tested by

no test coverage detected