{"id":26784710,"url":"https://github.com/theflash2k/ctfd-player-cli","last_synced_at":"2026-06-29T11:31:10.275Z","repository":{"id":268582661,"uuid":"877059863","full_name":"TheFlash2k/CTFd-Player-CLI","owner":"TheFlash2k","description":"A CTFd CLI interface that can be used to interact with a specific CTFd instance (with Tab Autocompletion)","archived":false,"fork":false,"pushed_at":"2024-12-17T16:28:53.000Z","size":70,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-14T07:28:48.707Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheFlash2k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-23T02:39:06.000Z","updated_at":"2025-01-02T07:08:16.000Z","dependencies_parsed_at":"2024-12-17T17:42:36.581Z","dependency_job_id":null,"html_url":"https://github.com/TheFlash2k/CTFd-Player-CLI","commit_stats":null,"previous_names":["theflash2k/ctfd-player-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TheFlash2k/CTFd-Player-CLI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheFlash2k%2FCTFd-Player-CLI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheFlash2k%2FCTFd-Player-CLI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheFlash2k%2FCTFd-Player-CLI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheFlash2k%2FCTFd-Player-CLI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheFlash2k","download_url":"https://codeload.github.com/TheFlash2k/CTFd-Player-CLI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheFlash2k%2FCTFd-Player-CLI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34925718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-29T10:29:25.128Z","updated_at":"2026-06-29T11:31:10.226Z","avatar_url":"https://github.com/TheFlash2k.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CTFd-CLI\nA simple utility that allows interacting with CTFd easier, submitting flags, downloading challenges, all from the CLI. The only thing you'll need to do is generate a token, which you can even do by just providing your creds.\n\n## Setup\n\nTo setup `ctfd`, just run the following command:\n\n```bash\n$ sudo python3 setup.py install\n```\n\n\u003e **NOTE:** Atleast `Python 3.7` is required to run this utility.\n\n## Usage\n\nThe usage is fairly is simple. Consider a scenario where you're playing a CTF. The first thing you'll do is create a folder, let's say, `ABC-CTF`. The next thing you'll need to do is run:\n\n```bash\n$ ctfd init [--url \u003cURL\u003e] [--token \u003cTOKEN\u003e]\n```\n\n\u003e If no arguments are provided, you'll be prompted to manually enter those. You **CAN** skip entering token by just pressing enter.\n\nNow, let's say you don't have a token, you can generate a token using `generate-token` command:\n\n```bash\n$ ctfd generate-token --name \u003cusername/email\u003e --password \u003cpassword\u003e\n```\n\nWhat this will do is generate a token for you. There also is a parameter called `--force`, that'll be used in case you want to forcefully generate another token.\n\n\u003e The token and URL will be stored in `.ctfd/config.json`.\n\nOnce this is done, you need to get the list of all challenges, these challenges name and id will be stored inside the `.ctfd/config.json` file. The command used will be:\n\n```bash\n$ ctfd sync\n```\n\nAfter this, in order to fetch a challenge's attachments and details, you can use `challenges` command.\n\n```bash\n$ ctfd challenges [--category \u003ccategory\u003e] [--name \u003cchallenge-name\u003e]\n```\n\n\u003e **NOTE:** If no arguments are provided, it will download all the challenges, their attachments, hints, points and category and store in a directory structure like: `Challenges/\u003cCategory\u003e/\u003cName\u003e/README.md`\n\nIn case challenges have instances specifically [containers](https://github.com/theflash2k/containers) plugin, you can start, stop and extend as well.\n\n```bash\n# Atleast one must be provided.\n$ ctfd instance start [--challenge-id \u003cID\u003e] [--challenge-name \u003cNAME\u003e]\n\n# To stop:\n$ ctfd instance stop [--challenge-id \u003cID\u003e] [--challenge-name \u003cNAME\u003e]\n\n# To extend time:\n$ ctfd instance extend [--challenge-id \u003cID\u003e] [--challenge-name \u003cNAME\u003e]\n```\n\nYou can also submit flags from the command-line:\n\n```bash\n$ ctfd submit --challenge-id \u003cID\u003e --flag \u003cFLAG\u003e\n```\n\nFor your ease, whenever you run: `ctfd challenges`, I will create two scripts in the challenge directory: `launch.sh` and `submit.sh`. `launch.sh` will only exist for challenges that have their type = container. But `submit.sh` will be there for all challenges. You can submit a challenge using `./submit.sh \u003cflag\u003e`. Whereas, `launch.sh` won't take any parameter and will just start the instance for that specific challenge.\n\nYou can also see the scoreboard and solves on a particular challenge:\n\n```bash\n$ ctfd scoreboard [-n \u003cmax-results\u003e {Default: 10}]\n# OR\n$ ctfd solves [--challenge-id \u003cID\u003e] [--challenge-name \u003cNAME\u003e]\n```\n\n## Autocompletions\n\nUnder the hood, this tool utilizes `argcomplete` library for autocomplettions. To make it work, please firstly run this command:\n\n```bash\n$ activate-global-python-argcomplete\n```\n\nAfter this is done, add this to your `.zsh/.bashrc`\n\n```bash\neval \"$(register-python-argcomplete ctfd)\"\n```\n\nOnce this is done, you will tab autocompletion for your `ctfd` utility.\n\n\n## Future Work\n\nExtracting components from the other [CTFd CLI](https://github.com/TheFlash2k/CTFd-CLI) and then migrating the code to a single CLI application.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheflash2k%2Fctfd-player-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheflash2k%2Fctfd-player-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheflash2k%2Fctfd-player-cli/lists"}