Path¶
- 
class 
baboossh.Path(src, dst)[source]¶ Indicates an endpoint is reachable from a host
A path is created when an
Endpointcan be reached from aHost, either by being on the same network or by not having filtering between both. This is used to pivot through compromised hosts to reach endpoints which could not be accessed from the user’s position in the network (“Local”)This class provides various functions to get paths to Endpoints through several pivots, or to discover new paths to the host.
- 
src¶ the starting Host of the path. if None, the path starts at “Local”, the user current’s position in the network.
- Type
 Hostor None
- 
id¶ The path id
- Type
 int
Methods
__init__(src, dst)Initialize self.
delete()Delete an Path from the
Workspacedirect(dst)Check if there is a direct Path from “Local” to an Endpoint
find_all([src, dst])Find all Paths
find_one([path_id])Find an path by its id
get(dst[, first])Get the chain of paths from “Local” to an Endpoint
get_id(src, dst)save()Save the Path in database
Attributes
scope- 
classmethod 
direct(dst)[source]¶ Check if there is a direct Path from “Local” to an Endpoint
- Parameters
 dst (
Endpoint) – the Endpoint to use as destination- Returns
 True if there is a Path from “Local” to dst, False otherwise
- 
classmethod 
find_one(path_id=None)[source]¶ Find an path by its id
- Parameters
 pathId (int) – the path id to search
- Returns
 A single Path or None.
-