From 5ab92a703fe01634e086cbf278dc8ca36c438a54 Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Wed, 27 Aug 2025 21:02:59 -0400 Subject: Add auto downloading of project file dependencies, clean up download APIs --- python/collaboration/examples/download_everything.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'python/collaboration/examples/download_everything.py') diff --git a/python/collaboration/examples/download_everything.py b/python/collaboration/examples/download_everything.py index ef804e39..61199daa 100644 --- a/python/collaboration/examples/download_everything.py +++ b/python/collaboration/examples/download_everything.py @@ -19,7 +19,6 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. -from pathlib import Path import sys import binaryninja @@ -40,18 +39,13 @@ def main(): # Pull every file from every project for project in remote.projects: for file in project.files: - bndb_path = file.default_path - print(f"{project.name}/{file.name} BNDB at {bndb_path}") + print(f"{project.name}/{file.name} BNDB at {file.default_path}") try: - metadata: binaryninja.FileMetadata = file.download_to_bndb(bndb_path) - - for v in metadata.existing_views: - if v == 'Raw': - continue - bv = metadata.get_view_of_type(v) + file.download() + with binaryninja.load(file.core_file) as bv: # Show the entry point to demonstrate we have pulled the analyzed file - print(f"{project.name}/{file.name} {v} Entrypoint @ 0x{bv.entry_point:08x}") + print(f"{project.name}/{file.name} {bv.view_type} Entrypoint @ 0x{bv.entry_point:08x}") except InterruptedError as e: # In case of ^C raise e -- cgit v1.3.1