nullpxl / nullctf Goto Github PK
View Code? Open in Web Editor NEWA Discord bot that provides ctf tools for collaboration in Discord servers!
License: GNU General Public License v3.0
A Discord bot that provides ctf tools for collaboration in Discord servers!
License: GNU General Public License v3.0
There should be error messages when a challenge is removed, solved or worked on without being first created to reduce typos
When attempting to self-host this bot (by building the docker image), I came across an issue where the bot threw out errors about
TypeError: 'Collection' object is not callable. If you meant to call the 'update' method on a 'Collection' object it is failing because no such method exists.
, and I was not seeing any data written to the database.
I'm running monogdb with the latest docker image (id: 20106db9aa7a) and connecting the two containers via a shared docker network.
From what I understand from the interwebs, this is due to pymongo changing the syntax for updating a collection to use .update_one()
or .update_many()
from v3.x onwards. (or at least what I think this is what the issue was)
Running the bot with pymongo 2.9.5 (the last version before pymongo 3.0) clears up the issues that I was facing. (changing requirements.txt:2
to pymongo==2.9.5
)
(not to say we should be running a library that was built in 2015, but this seemed like the easiest method to get the bot up and running without any code changes so ¯\_(ツ)_/¯ )
alternatively, if there are plans to update the bot, then the above can probably be ignored lol
Not sure if the license for the bot is really clear or present?
add >ctf challenge remove "challenge"
to remove it from the db, and challenge list.
shorthand would be >ctf chal r "challenge"
Would be used if someone makes a typo in a challenge addition, or just wants to clean up clutter in the challenge list.
While in DM if you try to create a CTF channel it says You do not have the appropriate permissions to run this command.I suggest you could make it say this command is only available in servers and lots of commands doesn't work in DM so this may resolve the issue
user would do something like >ctf creds "username" "password"
this would then pin an auto-generated message with the credentials, not touching the database at all
whenever the user does >ctf creds
bot checks for pinned credentials, if they exist then pull them and send in the channel.
Suggested by @warlock_rootx#8526 on Discord
>ctf challenge add "chall name" "chall category"
adds the specified challenge to the specified category
>ctf challenge list
Shows all (no changes)
>ctf challenge list "chall category"
shows a list of the specified category's challenges
e.g) >ctf challenge list web
shows all challenges in the web category.
For discord servers that don't want everyone to be able to join and view the channel
>ctf create_private "CTF NAME"
creates a normal ctf, but now only the creator (and nullctf) is given the role.
Creator can now do >ctf invite "username"
(inside the ctf channel) to give the role to the invited user, allowing them to access the channel.
requirements.txt, how to setup mongodb, auth.py / mongo.py, etc.
Writing challenge everytime is not fun. Better alias would be chall
.
Most modern cTFs use the ctfd platform to host. This platform has API to get challenges automatically, with get request https://ctfhost/api/v1/challenges, This request can be use for auto setup challenges to ctf.
request make ctf feature in this bot
edit: the following is entirely not serious. it is a garbage issue for humour.
Hey Peter, have you ever considered integrating ChatGPT into your bot? Adding ChatGPT can significantly enhance the capabilities of your bot and provide users with a more engaging and natural conversational experience.
Here are a few reasons why you should consider it:
Improved Conversational Abilities: ChatGPT is trained on vast amounts of text from diverse sources, enabling it to engage in conversations on a wide range of topics with fluency and coherence.
Personalization: By integrating ChatGPT, you can tailor the responses to match the tone and style of your bot, creating a seamless experience for your users.
24/7 Availability: With ChatGPT, your bot can handle conversations at any time of the day, allowing users to interact with your service whenever they need assistance.
Scalability: As your user base grows, ChatGPT can scale alongside, handling multiple conversations simultaneously without compromising the quality of interactions.
Quick Implementation: Integrating ChatGPT into your existing infrastructure is straightforward, requiring minimal development effort.
By adding ChatGPT to your bot, you can differentiate your service from competitors, increase user engagement, and provide a more satisfying experience for your users. Let's discuss how we can make this happen!
I want to make color for any challenge category and color for player names who solved the challenge for better experience and make the list more readable!
can you guide me to do so? :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.