MCPcopy
hub / github.com/Pennyw0rth/NetExec / create_workspace

Function create_workspace

nxc/database.py:74–92  ·  view source on GitHub ↗

Create a new workspace with the given name. Args: ---- workspace_name (str): The name of the workspace. Returns: ------- None

(workspace_name, p_loader=None)

Source from the content-addressed store, hash-verified

72
73
74def create_workspace(workspace_name, p_loader=None):
75 """
76 Create a new workspace with the given name.
77
78 Args:
79 ----
80 workspace_name (str): The name of the workspace.
81
82 Returns:
83 -------
84 None
85 """
86 if exists(path_join(WORKSPACE_DIR, workspace_name)):
87 print(f"[-] Workspace {workspace_name} already exists")
88 else:
89 print(f"[*] Creating {workspace_name} workspace")
90 mkdir(path_join(WORKSPACE_DIR, workspace_name))
91
92 init_protocol_dbs(workspace_name, p_loader)
93
94
95def delete_workspace(workspace_name):

Callers 4

db_setupFunction · 0.90
do_workspaceMethod · 0.90
mainFunction · 0.90
initialize_dbFunction · 0.85

Calls 1

init_protocol_dbsFunction · 0.85

Tested by 1

db_setupFunction · 0.72