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.
Methods
__init__(name)Initialize self.
close()connect(targets[, verbose, probe_auto])connection_del(target)Remove a
Connectionfrom the workspacecreate(name)Create a new workspace
creds_add(creds_type, stmt)Add
Credsto the workspacecreds_del(creds_id)Delete a
Creds‘ from the workspacecreds_edit(creds_id)Edit a
Creds‘ propertiescreds_show(creds_id)Show a
Creds‘ propertiesendpoint_add(ipaddr, port)Add an
Endpointto the workspaceendpoint_del(endpoint)Remove an
Endpointfrom the workspaceendpoint_search(field, val[, show_all, add_tag])get_objects([local, hosts, connections, …])host_del(host)Remove a
Hostfrom the workspacehost_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
Connectionscope(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
Userto the workspaceuser_del(name)Remove a
Userfrom the workspaceAttributes
active- 
connection_close(target)[source]¶ Close a
Connectionand any connection or tunnel using it- Parameters
 target (str) – the Connection string
- 
connection_del(target)[source]¶ Remove a
Connectionfrom 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
Credsto 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
- 
endpoint_add(ipaddr, port)[source]¶ Add an
Endpointto the workspace- Parameters
 ipaddr (str) – the Endpoint ‘s IP address
ipaddr – the Endpoint ‘s port
- 
endpoint_del(endpoint)[source]¶ Remove an
Endpointfrom the workspace- Parameters
 endpoint (str) – the Endpoint ‘s string (ip:port)
- 
endpoint_tag(endpoint, tagname)[source]¶ Add a
Tagto anEndpoint- Parameters
 endpoint (str) – the Endpoint ‘s string (ip:port)
tagname (str) – the
Tagname
- 
endpoint_untag(endpoint, tagname)[source]¶ Remove a
Tagfrom anEndpoint- Parameters
 endpoint (str) – the Endpoint ‘s string (ip:port)
tagname (str) – the
Tagname
- 
host_del(host)[source]¶ Remove a
Hostfrom the workspace- Parameters
 name (str) – The Host ‘s username
- 
host_tag(host, tagname)[source]¶ Add a
Tagto anHost- Parameters
 host (str) – the Host ‘s string (ip:port)
tagname (str) – the
Tagname
- 
host_untag(host, tagname)[source]¶ Remove a
Tagfrom anHost- Parameters
 host (str) – the Host ‘s string (ip:port)
tagname (str) – the
Tagname
- 
run(targets, payload, stmt, verbose=False)[source]¶ Run a payload on a list of
Connection- Parameters
 targets ([
Connection]) – the target listpayload (
Payload) – the payload to runstmt (argparse.Namespace) – the command parameters to pass to the payload
-