Workspace

class baboossh.Workspace(name)[source]

A container to hold all related objects

The workspace allows to separate environments with dedicated folders and database. Any object (Endpoint, User, Creds, Connection, etc. exists only in its workspace to avoid cluttering the user.

__init__(name)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(name)

Initialize self.

close()

connect(targets[, verbose, probe_auto])

connection_del(target)

Remove a Connection from the workspace

create(name)

Create a new workspace

creds_add(creds_type, stmt)

Add Creds to the workspace

creds_del(creds_id)

Delete a Creds ‘ from the workspace

creds_edit(creds_id)

Edit a Creds ‘ properties

creds_show(creds_id)

Show a Creds ‘ properties

endpoint_add(ipaddr, port)

Add an Endpoint to the workspace

endpoint_del(endpoint)

Remove an Endpoint from the workspace

endpoint_search(field, val[, show_all, add_tag])

get_objects([local, hosts, connections, …])

host_del(host)

Remove a Host from the workspace

host_search(field, val[, show_all, add_tag])

identify_object(target)

path_add(src, dst)

path_del(src, dst)

path_find_existing(dst[, as_ip])

probe(targets[, gateway, verbose, find_new])

run(targets, payload, stmt[, verbose])

Run a payload on a list of Connection

scope(target)

search_fields(obj)

set_option(option, value)

Set an option for the Workspace

tunnel_close(port)

tunnel_open(target[, port])

unstore(data)

user_add(name)

Add a User to the workspace

user_del(name)

Remove a User from the workspace

Attributes

active

connection_close(target)[source]

Close a Connection and any connection or tunnel using it

Parameters

target (str) – the Connection string

connection_del(target)[source]

Remove a Connection from the workspace

Parameters

target (str) – the Connection string

classmethod create(name: str)[source]

Create a new workspace

Create a new workspace with its dedicated folder (in $HOME/.baboossh by default) and its database.

creds_add(creds_type, stmt)[source]

Add Creds to the workspace

Parameters
  • creds_type (str) – The Creds ‘ object type

  • stmt (argparse.Namespace) – the rest of the command be parsed by the object

creds_del(creds_id)[source]

Delete a Creds ‘ from the workspace

Parameters

creds_id (str) – The Creds ‘ id

creds_edit(creds_id)[source]

Edit a Creds ‘ properties

Parameters

creds_id (str) – The Creds ‘ id

creds_show(creds_id)[source]

Show a Creds ‘ properties

Parameters

creds_id (str) – The Creds ‘ id

endpoint_add(ipaddr, port)[source]

Add an Endpoint to the workspace

Parameters
  • ipaddr (str) – the Endpoint ‘s IP address

  • ipaddr – the Endpoint ‘s port

endpoint_del(endpoint)[source]

Remove an Endpoint from the workspace

Parameters

endpoint (str) – the Endpoint ‘s string (ip:port)

endpoint_tag(endpoint, tagname)[source]

Add a Tag to an Endpoint

Parameters
  • endpoint (str) – the Endpoint ‘s string (ip:port)

  • tagname (str) – the Tag name

endpoint_untag(endpoint, tagname)[source]

Remove a Tag from an Endpoint

Parameters
  • endpoint (str) – the Endpoint ‘s string (ip:port)

  • tagname (str) – the Tag name

host_del(host)[source]

Remove a Host from the workspace

Parameters

name (str) – The Host ‘s username

host_tag(host, tagname)[source]

Add a Tag to an Host

Parameters
  • host (str) – the Host ‘s string (ip:port)

  • tagname (str) – the Tag name

host_untag(host, tagname)[source]

Remove a Tag from an Host

Parameters
  • host (str) – the Host ‘s string (ip:port)

  • tagname (str) – the Tag name

run(targets, payload, stmt, verbose=False)[source]

Run a payload on a list of Connection

Parameters
  • targets ([Connection]) – the target list

  • payload (Payload) – the payload to run

  • stmt (argparse.Namespace) – the command parameters to pass to the payload

set_option(option, value)[source]

Set an option for the Workspace

Parameters
  • option (str) – the option to set

  • value (str) – the new value

user_add(name)[source]

Add a User to the workspace

Parameters

name (str) – The User ‘s username

user_del(name)[source]

Remove a User from the workspace

Parameters

name (str) – The User ‘s username