Goofygiraffe06 / DailyCTFRobot

An Awesome, Feature Rich Discord Bot for Hosting and Managing CTF Challenges on Discord Written in Python3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Logo

DailyCTF Robot

An Awesome, Feature Rich Discord Bot to Host and Manage CTF Challenges on Discord Written in Python3

Report Bug . Request Feature

Contributors Forks Stargazers Issues License Contributor Covenant

Table Of Contents

About The Project

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.

Features

  • 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.

Under the Hood

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.

Getting Started

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.

Prerequisites

  • git installed on your machine.
  • Python (version 3.8 or above).

Installation

Local Installation

  1. Clone the Repository:
https://github.com/Goofygiraffe06/DailyCTFRobot.git
  1. Navigate to the Directory:
cd DailyCTFRobot
  1. Install Required Packages:
pip install -r requirements.txt
  1. Configuring env Variables:
echo token='<Your_Discord_Bot_Token_Here>' >> .env
  1. Run The Bot:
python main.py

[DEPRICATED] Replit Installation (Free 24/7)

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.

Usage

  • /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.

Contributing

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.

License

Distributed under the MIT License. See LICENSE for more information.

About

An Awesome, Feature Rich Discord Bot for Hosting and Managing CTF Challenges on Discord Written in Python3

License:GNU General Public License v3.0


Languages

Language:Python 100.0%