https://github.com/redpwn/rctf-golf
A Python 3 library for developing CTF golfing challenges
https://github.com/redpwn/rctf-golf
ctf ctf-framework ctf-golf ctf-golfing ctf-platform ctf-tools golf golfing rctf
Last synced: 5 months ago
JSON representation
A Python 3 library for developing CTF golfing challenges
- Host: GitHub
- URL: https://github.com/redpwn/rctf-golf
- Owner: redpwn
- License: bsd-3-clause
- Created: 2020-06-15T03:58:35.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-25T06:33:16.000Z (almost 5 years ago)
- Last Synced: 2025-09-29T10:24:53.598Z (8 months ago)
- Topics: ctf, ctf-framework, ctf-golf, ctf-golfing, ctf-platform, ctf-tools, golf, golfing, rctf
- Language: Go
- Size: 23.4 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# About
rCTF-golf is a Python 3 library for developing CTF golfing challenges.
# Installation
## Automatic
```sh
pip3 install rctf-golf
```
## Manual
```sh
git clone https://github.com/redpwn/rCTF-golf.git
cd rCTF-golf.git
pip3 install requirements.txt
./setup.py install
```
# Usage
```python
from rctf import golf
rctf_host = 'https://staging.redpwn.net/' # just the base url of your rCTF installation
challenge_id = 'e0efc6e1-3b04-400a-9d72-a2e2ae02c1f6' # you can also use the challenge name
ctf_start = int(time.time() - 3*3600) # three hours ago
limit_function = lambda x : x
current_limit = golf.calculate_limit(rctf_host, challenge_id, ctf_start, limit_function)
```
## Debugging
When testing your challenge, you can set the `DEBUG` environmental variable to the number of hours after the CTF has started, and rCTF-golf will automatically bypass calculation logic.
**Note:** Take care to ensure users do not control the `DEBUG` environmental variable when running your Python script or they may be able to hijack the limit calculations.
# Documentation
[Click here to see the documentation](rctf/golf/util.py)