Skip to main content

A wrapper for the pwn.college API. This allows automating interactions with pwn.college and also includes a command-line-interface(CLI) to list dojos/modules, submit flags, start challenges, run commands in challenge containers and more.

Project description

PyPwnCollege

Run Tests codecov Documentation Status PyPI version PyPI Statistics

PyPwnCollege is an unofficial Python library to interact with the pwn.college API and website.

Install

pip install pypwncollege

Demo

Note: Username/Password is not stored on the system, only the session cookie "app_cookie" is stored in ~/.pwncli.json. Re-login might be needed if that cookie expires.

from pwncollege import PWNClient
# Create an API connection
client = PWNClient(email="user@example.com", password="S3cr3tP455w0rd!")
# Print the User associated with the client
print(client.user)

CLI

The library also comes with a CLI to interact with the API which is a work in progress. It is included in the published pip package and should be available in shell.

Basic usage:

pwncli --help
pwncli login -u test1337 -p test1337
pwncli get --dojos
pwncli challenge -d fundamentals -m program-misuse -c level-1 -f flag{test}

Note: Not specifying the password on the command line will make pwncli request it like sudo does.

Documentation

The documentation is available here.

Current Features

  • Logging into the API
  • Fetching Dojos, Modules, Challenges
    • Starting a Challenge
    • Running an ssh command on a challenge
    • Submitting flags
  • Getting User details
  • Getting rankings in dojos and modules
  • Getting information about belted users

Contributing

If you find a bug or want to add a feature, feel free to open an issue or a pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypwncollege-0.1.8.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypwncollege-0.1.8-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file pypwncollege-0.1.8.tar.gz.

File metadata

  • Download URL: pypwncollege-0.1.8.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-90-generic

File hashes

Hashes for pypwncollege-0.1.8.tar.gz
Algorithm Hash digest
SHA256 cdec3bc102d603f0af418a8c2e1ea50d8780e31869ec21681586abd58b187135
MD5 2f64afddb4ea4622cb82d96051521736
BLAKE2b-256 183bc5a9a4c9a2d2c0133e94b32abd5b74d873740aeceac368c564848a7ea141

See more details on using hashes here.

File details

Details for the file pypwncollege-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: pypwncollege-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-90-generic

File hashes

Hashes for pypwncollege-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8002d2f20acc654a22fead28d6ff672b88b3ffbc1d22fd27aed62f39e1d662ad
MD5 40de9b08bd850a1454c06154c7cadc42
BLAKE2b-256 ddd50941c2d85893612dc183ddb95a04f8164c5aa1e673cdce293f97a30f1372

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page