Pro General API

The Pro General API methods provide access to product version information, active projects, and user accounts.

pro.about

The pro.about method returns a hash containing basic information about the running Metasploit Pro instance.

Request Example

shell
1
[ "pro.about", "<token>" ]

Response Example

json
1
{"product" => "Metasploit Pro", "version" => "4.11.0" }

pro.workspaces

The pro.workspaces method returns a list of all active Metasploit Pro projects. Although these are called products in the user interface, the underlying object is referred to as a workspace, and the terms workspace and project are used interchangeably throughout this guide.

Request Example

shell
1
[ "pro.workspaces", "<token>" ]

Response Example

json
1
{ "Project1" => {
2
"created_at" => 1303706869,
3
"updated_at" => 1303706869,
4
"name" => "Project1",
5
"boundary" => "192.168.0.0/24",
6
"description" => "This is the local office network",
7
"owner" => "admin",
8
"limit_to_network" => false
9
}
10
}

pro.projects

The pro.projects method is an alias for the pro.workspaces method.

pro.workspace_add

The pro.workspace_add method adds a new workspace with the specified settings and returns a hash of that contains information on the newly created workspace.

Request Example

shell
1
[ "pro.workspace_add", "<token>", { "name" => "Project1" ]

Response Example

json
1
{ "Project1" => {
2
"created_at" => 1303706869,
3
"updated_at" => 1303706869,
4
"name" => "Project1",
5
"boundary" => "192.168.0.0/24",
6
"description" => "This is the local office network",
7
"owner" => "admin",
8
"limit_to_network" => false
9
}
10
}

Hash keys that can be passed in to this method include:

  • name - The unique name of the newly created workspace.
  • boundary - The default network range for this project.
  • description - A short amount of text describing this project.
  • limit_to_network - A Boolean indicating whether to restrict operations to the boundary.

pro.project_add

The pro.project_add method is an alias for the pro.workspace_add method.

pro.workspace_del

The pro.workspace_del removes the workspace specified in the WorkspaceName parameter.

Request Example

shell
1
[ "pro.workspace_del", "<token>", "Project1" ]

Response Example

json
1
{ "result" => "success" }

pro.project_del

The pro.project_del method is an alias for the pro.workspace_del method.

pro.users

The pro.users method returns a list of all configured user accounts in the Metasploit Pro instance.

Request Example

shell
1
[ "pro.users", "<token>" ]

Response Example

json
1
{ "users" => {
2
"admin" => {
3
"username" => "admin",
4
"admin" => true,
5
"fullname" => "Joe Admin",
6
"email" => "joe_admin@example.org",
7
"phone" => "1-555-555-1212",
8
"company" => "Giant Widgets, Inc."
9
}
10
}
11
}