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

Method seek

python/binaryview.py:10448–10467  ·  view source on GitHub ↗

``seek`` update internal offset to ``offset``. :param int offset: offset to set the internal offset to :param int whence: optional, defaults to 0 for absolute file positioning, or 1 for relative to current location :rtype: None :Example: >>> hex(br.offset) '0x100000008L' >>> br

(self, offset: int, whence: Optional[int] = 0)

Source from the content-addressed store, hash-verified

10446 return struct.unpack(">Q", result)[0]
10447
10448 def seek(self, offset: int, whence: Optional[int] = 0) -> None:
10449 """
10450 ``seek`` update internal offset to ``offset``.
10451
10452 :param int offset: offset to set the internal offset to
10453 :param int whence: optional, defaults to 0 for absolute file positioning, or 1 for relative to current location
10454 :rtype: None
10455 :Example:
10456
10457 >>> hex(br.offset)
10458 '0x100000008L'
10459 >>> br.seek(0x100000000)
10460 >>> hex(br.offset)
10461 '0x100000000L'
10462 >>>
10463 """
10464 if whence:
10465 self.seek_relative(offset)
10466 return
10467 core.BNSeekBinaryReader(self._handle, offset)
10468
10469 def seek_relative(self, offset: int) -> None:
10470 """

Callers 13

get_ascii_string_atMethod · 0.95
__init__Method · 0.95
readMethod · 0.95
read8Method · 0.95
read16Method · 0.95
read32Method · 0.95
read64Method · 0.95
read16leMethod · 0.95
read32leMethod · 0.95
read64leMethod · 0.95
read16beMethod · 0.95
read32beMethod · 0.95

Calls 1

seek_relativeMethod · 0.95

Tested by

no test coverage detected