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

Function load

python/__init__.py:396–427  ·  view source on GitHub ↗

Opens a BinaryView object. :param Union[str, bytes, bytearray, 'databuffer.DataBuffer', 'os.PathLike'] source: a file or byte stream to load into a virtual memory space :param bool update_analysis: whether or not to run :func:`update_analysis_and_wait` after opening a :py:class:`BinaryView`, de

(*args, **kwargs)

Source from the content-addressed store, hash-verified

394
395
396def load(*args, **kwargs) -> BinaryView:
397 """
398 Opens a BinaryView object.
399
400 :param Union[str, bytes, bytearray, 'databuffer.DataBuffer', 'os.PathLike'] source: a file or byte stream to load into a virtual memory space
401 :param bool update_analysis: whether or not to run :func:`update_analysis_and_wait` after opening a :py:class:`BinaryView`, defaults to ``True``
402 :param callback progress_func: optional function to be called with the current progress and total count for BNDB files only
403 :param dict options: a dictionary in the form {setting identifier string : object value}
404 :return: returns a :py:class:`BinaryView` object for the given filename
405 :rtype: :py:class:`BinaryView`
406 :raises Exception: When a BinaryView could not be created
407
408 .. note:: The progress_func callback **must** return True to continue the load operation, False will abort the load operation.
409
410 .. warning:: The progress_func will **only** be called for BNDB files, not for any other file format due to a `design limitation <https://docs.binary.ninja/guide/debugger/index.html#navigating-the-binary>`_.
411
412 :Example:
413 >>> from binaryninja import *
414 >>> with load("/bin/ls") as bv:
415 ... print(len(list(bv.functions)))
416 ...
417 134
418
419 >>> with load(bytes.fromhex('5054ebfe'), options={'loader.platform' : 'x86'}) as bv:
420 ... print(len(list(bv.functions)))
421 ...
422 1
423 """
424 bv = BinaryView.load(*args, **kwargs)
425 if bv is None:
426 raise Exception("Unable to create new BinaryView")
427 return bv
428
429
430def connect_pycharm_debugger(port=5678):

Callers 7

upload_new_fileMethod · 0.50
get_bininfoFunction · 0.50
print_syscallsFunction · 0.50
dump_dwarfFunction · 0.50
parse_range_data_offsetsFunction · 0.50
parse_dwarfFunction · 0.50

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected