Skip to content

Zeeshan12340/pypwncollege

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages