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

Method read8

python/binaryview.py:10230–10250  ·  view source on GitHub ↗

``read8`` returns a one byte integer from offset incrementing the offset. :param int address: offset to set the internal offset before reading :return: byte at offset. :rtype: int, or None on failure :Example: >>> br.seek(0x100000000) >>> br.read8() 207 >>>

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

Source from the content-addressed store, hash-verified

10228 return dest.raw
10229
10230 def read8(self, address: Optional[int] = None) -> Optional[int]:
10231 """
10232 ``read8`` returns a one byte integer from offset incrementing the offset.
10233
10234 :param int address: offset to set the internal offset before reading
10235 :return: byte at offset.
10236 :rtype: int, or None on failure
10237 :Example:
10238
10239 >>> br.seek(0x100000000)
10240 >>> br.read8()
10241 207
10242 >>>
10243 """
10244 if address is not None:
10245 self.seek(address)
10246
10247 result = ctypes.c_ubyte()
10248 if not core.BNRead8(self._handle, result):
10249 return None
10250 return result.value
10251
10252 def read16(self, address: Optional[int] = None) -> Optional[int]:
10253 """

Callers 1

get_ascii_string_atMethod · 0.95

Calls 1

seekMethod · 0.95

Tested by

no test coverage detected