An Awesome, Feature Rich Discord Bot to Host and Manage CTF Challenges on Discord Written in Python3
Report Bug
.
Request Feature
DailyCTF Robot is a Discord bot designed specifically for hosting and managing CTF challenges. It provides a seamless and streamlined experience for both organizers and participants, handling everything from the announcement of a challenge to the submission and validation of flags.
- Dynamic bot presence: The bot's activity status is heavily inspired from Cyberchef loading screen messages.
- Role-based management: Organizers can designate roles that can create or manage challenges, ensuring that the system remains tamper-proof.
- Intuitive UI components: The bot leverages Discord's UI components such as modals providing form like interface for users to create challenges and to setup.
- Versatile command suite: The bot includes commands for users (e.g., submitting flags, querying challenge time remaining) and admins (e.g., setting up and shutting down challenges, gathering feedback).
- Feedback loop: Users can provide feedback, after every submission creating a loop of feedback and continuous improvement.
- Event logging: All significant actions and interactions with the bot are logged for transparency and traceability.
- Personalized on_guild message: The bot introduces itself and provides essential guidelines when introduced to a new server.
- Configurable settings: Different servers can have different requirements, so the bot offers configurable settings for a tailored experience.
- Security: The bot has built-in security protocols, such as rigorous permission checks and safeguarding challenge answers.
The bot relies on a modular design, with each cog handling a specific set of tasks. This ensures maintainability and scalability. Keeping the primary logic clutter-free and comprehensible.
These instructions will guide you on how to deploy and run the DailyCTF Robot on your local machine for development and testing purposes, as well as how to deploy it for production use on your Discord server.
git
installed on your machine.Python
(version 3.8 or above).
- Clone the Repository:
https://github.com/Goofygiraffe06/DailyCTFRobot.git
- Navigate to the Directory:
cd DailyCTFRobot
- Install Required Packages:
pip install -r requirements.txt
- Configuring env Variables:
echo token='<Your_Discord_Bot_Token_Here>' >> .env
- Run The Bot:
python main.py
1.Start a New Python Project: On your Replit dashboard, click on the + button to create a new repl and select Python.
2.Import from GitHub: On the Replit interface, you'll see an option to 'import from GitHub'. Enter the repository URL: https://github.com/Goofygiraffe06/DailyCTFRobot.git
3. Configure Secrets: On the left sidebar, you'll see an icon resembling a lock. Clicking on it and add a new secret with the secret name being 'token' and the key being Discord Bot Token.
4.Install Required Packages: Once the code is imported, Replit should automatically recognize the requirements.txt file and install the necessary dependencies. If not, run this in the Replit shell:
pip install -r requirements.txt
5.Run the bot: Click on the green Run button at the top of your Replit environment. Your bot should now be active and visit my blog, If you want to learn how to keep it persistent.
Important
This bot is designed for a single server use only and requires self-hosting.
/setup
: Initiate bot's server-specific setup - select roles & channels./help
: Displays a list of all available bot commands./setchallenge
: Start a new Capture The Flag challenge./shutdown
: Conclude the currently active CTF challenge./timeleft
: Check the remaining time for the current challenge and hint./feedback
: Provide feedback or report issues regarding the bot./ping
: Check the bot's responsiveness./rate
: Rate the active challenge out of 5./submit <flag>
: Submit your answer for the active CTF challenge.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- If you have suggestions for new features, optimizations or documentation, feel free to open an issue to discuss it (If you need any assistance), or directly create a pull request after you edit the README.md file with necessary changes.
- Please make sure you test the bot thoroughly .
- Create individual PR for each suggestion.
Distributed under the GPLv3 License. See LICENSE for more information.