containers package

Submodules

containers.manager module

exception containers.manager.BuildError(*report)[source]

Bases: Exception

Raised when build fails

__init__(*report)[source]
Parameters:report – description of the error
class containers.manager.Manager(verbose=True, logfile=None, custom_client=None, build_info=True)[source]

Bases: object

Facilitates working with honeypot containers

__init__(verbose=True, logfile=None, custom_client=None, build_info=True)[source]
Parameters:
  • verbose – generate logs related to container operations
  • logfile – write logs to a file
  • custom_client – specify a custom Docker Client
  • build_info – show log during image build phase
build_all_honeypots()[source]

Builds all available containers

build_honeypot(name)[source]

Builds the required image (if it doesn’t exist) and then creates a container from it

Parameters:name – container name
clean_all_honeypots()[source]

Removes all containers and underlying images

clean_honeypot(name)[source]

Removes container and underlying image for chosen container

Parameters:name – container name
static get_available_honeypots()[source]

Returns a list with the names of all available honeypots

get_honeypot_ip(name)[source]

Gets the IP address of a running container

Parameters:name – container name
Returns:container ip address
start_honeypot(name)[source]

Starts the chosen container

Parameters:name – container name
stop_all_honeypots()[source]

Stops all active containers

stop_honeypot(name)[source]

Stops the chosen container

Parameters:name – container name

Module contents