moloch-- / RootTheBox

A Game of Hackers (CTF Scoreboard & Game Manager)
http://root-the-box.com/
Apache License 2.0
935 stars 295 forks source link

More Webhooks please… #517

Closed PJNorrisS1 closed 2 years ago

PJNorrisS1 commented 2 years ago

Would it be possible to add webhooks for incorrect flags, completed levels, hints taken, and when a flag is captured perhaps time difference between that and previous (not essential). In addition, could there be more information in the hook, such as host name, or game name?

The idea is to have a master leader board and stats on which flags are hard and need hints and how many captures.

Thanks for the excellent work, we use your platform a lot and appreciate all your efforts.

eljeffeg commented 2 years ago

I'll take a look, but I'm going to tag @anthturner as he was the author of the webhooks. By incorrect flags, you mean like some of the info we include on the statistics page? Currently that's not something we expose outside the admin account. I wouldn't mind having something that reflected challenge difficulty, but not sure how much we'd want to provide on that. Completed levels, hints taken shouldn't be a problem - we show those on the scoreboard already.

eljeffeg commented 2 years ago

Looks like completed levels already had a webhook. Incorrect flags (capture failed) had a webhook, but it only fired if there was a penalty, so I changed that. Let me know if they're not working. I added hints taken hook as well as including game name and the origin for each hook. The time between flags will be difficult right now, but hope to remove the entire "snapshot" system and just timestamp all the actions at some point.

I don't have the webhook system setup on my dev machine.. so please test. :)

PJNorrisS1 commented 2 years ago

Thank you! I will do some testing later. Meanwhile, I use a free account on hookdeck.com to test the responses coming in. Just generate a URL and stick it in the .cfg file.

PJNorrisS1 commented 2 years ago

Oh man that is stunning! Thank you - so much more information in the hooks now and it works with captures and failures and hints! Thank you!