https://github.com/charafzellou/capturetheflag
A simple Golang app that exposes APIs for challengers to find info in them
https://github.com/charafzellou/capturetheflag
Last synced: about 2 months ago
JSON representation
A simple Golang app that exposes APIs for challengers to find info in them
- Host: GitHub
- URL: https://github.com/charafzellou/capturetheflag
- Owner: charafzellou
- License: agpl-3.0
- Created: 2023-02-03T09:39:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-24T12:08:40.000Z (over 1 year ago)
- Last Synced: 2025-04-12T19:00:06.191Z (about 2 months ago)
- Language: Go
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# capturetheflag
A simple Golang app that exposes APIs for challengers to find info in them.
## Process
- User can register a username
- User can check if their username is saved
- User can get the secret attached to their username
- User can request the challenge
- User can ask for a hint
- User can submit the result to the challenge## Available Routes
```md
PATH METHOD BODY
/ping GET
/signup POST {"User" : "xxxx"}
/check POST {"User" : "xxxx"}
/secret POST {"User" : "xxxx"}
/getLevel POST AuthRequest
/getUserPoints POST AuthRequest
/getChallenge POST AuthRequest
/getHint POST AuthRequest
/submitChallenge POST FullRequest
```## Request Body
```go
Request struct {
User string `json:"User"`
}
AuthRequest struct {
User string `json:"User"`
Secret string `json:"Secret"`
}FullRequest struct {
User string `json:"User"`
Secret string `json:"Secret"`
Content struct {
Level uint `json:"Level"`
Challenge struct {
Username string `json:"Username"`
Secret string `json:"Secret"`
Points uint `json:"Points"`
} `json:"Challenge"`
Protocol string `json:"Protocol"`
SecretKey string `json:"SecretKey"`
} `json:"Content"`
}```go