sshmitm.tutorial.hosts.logfile_inc.logfilegit package

Mock host: logfilegit.logfileinc.internal

Self-hosted Git platform (similar to Gitea/GitLab). Publishes registered SSH public keys at /<username>.keys without authentication — the same pattern used by GitHub and GitLab. Max Morgan has three keys registered.

The HTTP service is started via start_services(), which launches the built-in GitServer. The session data returned contains git_server_url and git_server_port so that tutorial step templates can reference them.

class sshmitm.tutorial.hosts.logfile_inc.logfilegit.LogfileGit

Bases: Host

logfilegit.logfileinc.internal — self-hosted Git platform.

__init__()
address: ClassVar[str] = '127.2.0.3'
configure(session_data)

Inject session values (passwords, keys, secrets) before start.

Parameters:

session_data (dict)

Return type:

None

hostname: ClassVar[str] = 'logfilegit.logfileinc.internal'
label: ClassVar[str] = 'logfilegit'
segment

alias of ApplicationServers

services: ClassVar[list[Service]] = [<sshmitm.tutorial.hosts.SSHService object>, <sshmitm.tutorial.hosts.HTTPService object>]
async start(events)

Start mock services. Store the event queue for later use.

Parameters:

events (Queue)

Return type:

None

start_services(session_data)

Start the HTTP git server and return git_server_url + git_server_port.

Parameters:

session_data (dict)

Return type:

dict

async stop()

Stop all running mock services.

Return type:

None

stop_services()

Stop any services started by start_services().

Return type:

None

users: ClassVar[list[type[User]]] = [<class 'sshmitm.tutorial.hosts.logfile_inc.MaxMorgan'>]