pwncollege.challenge — pwncollege Challenges

Challenges

class pwncollege.challenge.Challenge(data: dict, client: PWNClient)[source]

The class representing pwncollege challenges

id

Module specific ID or name of level

Type:

str

challenge_id

Dojo specific challenge ID

Type:

int

dojo

Dojo name

Type:

str

module

Module name

Type:

str

name

The name of the challenge

Type:

str

description

The challenge description

Type:

str

solves

The number of solves a challenge has

solved

Whether the active user has completed the challenge

Initialise a Challenge using API data

connect()[source]

Connects to the challenge via SSH

download(remote: str = '', local=None) str[source]

Downloads the challenges files located in /challenge by default :param remote: The path of the file to download. Defaults to /challenge :param local: The name of the zipfile to download to. If none is provided, it is saved to the current directory.

Returns: The path of the file

run(command: str = 'id', system: bool = False)[source]

Starts an interactive ssh session with the challenge

start(practice: bool = False) DockerInstance[source]

Requests the challenge be started

Parameters:

practice – Whether to start a practice instance

Returns:

The DockerInstance that was started

submit(flag: str)[source]

Submits a flag for a Challenge

Parameters:

flag – The flag for the Challenge