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

Function print_remote_info

python/collaboration/examples/multitool.py:31–56  ·  view source on GitHub ↗
(remote: Remote, extended=False)

Source from the content-addressed store, hash-verified

29
30
31def print_remote_info(remote: Remote, extended=False):
32 try:
33 if not remote.is_connected:
34 remote.connect()
35 except:
36 pass
37 if extended:
38 print(f"Name: {remote.name}\n"
39 f"Address: {remote.address}"
40 )
41 if remote.is_connected:
42 print(f"Id: {remote.unique_id}\n"
43 f"Is Enterprise: {remote.is_enterprise}\n"
44 f"Connected username: {remote.username}\n"
45 f"Is administrator: {remote.is_admin}\n"
46 f"Server version: {remote.server_version}\n"
47 f"Server build id: {remote.server_build_id}\n"
48 f"Project count: {len(remote.projects)}")
49 if remote.is_admin:
50 print(f"Group count: {len(remote.groups)}\n"
51 f"User count: {len(remote.users)}")
52 else:
53 if remote.is_connected:
54 print(f"{remote.name} @ {remote.address} (id: {remote.unique_id})")
55 else:
56 print(f"{remote.name} @ {remote.address} (id: ???)")
57
58def print_project_info(project: RemoteProject, extended=False):
59 if extended:

Callers 1

mainFunction · 0.85

Calls 1

connectMethod · 0.45

Tested by

no test coverage detected