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)
| 394 | |
| 395 | |
| 396 | def 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 | |
| 430 | def connect_pycharm_debugger(port=5678): |
no test coverage detected