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

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

Response Example

{"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

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

Response Example

{ "Project1" => { "created_at" => 1303706869, "updated_at" => 1303706869, "name" => "Project1", "boundary" => "192.168.0.0/24", "description" => "This is the local office network", "owner" => "admin", "limit_to_network" => false } }

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

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

Response Example

{ "Project1" => { "created_at" => 1303706869, "updated_at" => 1303706869, "name" => "Project1", "boundary" => "192.168.0.0/24", "description" => "This is the local office network", "owner" => "admin", "limit_to_network" => false } }

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

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

Response Example

{ "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

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

Response Example

{ "users" => { "admin" => { "username" => "admin", "admin" => true, "fullname" => "Joe Admin", "email" => "joe_admin@example.org", "phone" => "1-555-555-1212", "company" => "Giant Widgets, Inc." } } }