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.7.tar.gz (14.9 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.7-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pypwncollege-0.1.7.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Linux/6.11.0-29-generic

File hashes

Hashes for pypwncollege-0.1.7.tar.gz
Algorithm Hash digest
SHA256 fd05cfd55d46e6ce81483bfebb040142bcda086e7b784fb0a68def78c5de068d
MD5 8f5e2faf094e8ab3cf7a07ce7fcc8141
BLAKE2b-256 d9c5c251a6af017bbb6217bb257f2dba6f87e2b0d5d6a33c08c6d81fad7607ca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pypwncollege-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Linux/6.11.0-29-generic

File hashes

Hashes for pypwncollege-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b2c240a380a11266e13ab8c9ae72f0693fd55d6a0ff3ea6de3981a1dad43429a
MD5 302fc9f4444403a25daf966743702249
BLAKE2b-256 368a14887c5c4acf858e22ac1957363564843b5e6deb61e00bc530ba347d7e67

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