CTFd / ctfcli

ctfcli is a tool to manage Capture The Flag events and challenges
https://ctfd.io/
Apache License 2.0
165 stars 67 forks source link

add challenge mirror, verify, format functionality #134

Closed MilyMilo closed 10 months ago

MilyMilo commented 10 months ago

Adds ctf challenge mirror <challenge> and ctf challenge verify <challenge> adapted from #106

Originally, this functionality was called pull and verify - however, push is already used to push challenge changes to the git repository. I think mirror is a better name, as ctfcli will attempt to mirror / copy the remote state from ctfd. This way pull stays in its current git-like form, for git-related operations.

More additions:

Thanks to @reteps for the initial contribution!

Closes: #101 #106

MilyMilo commented 10 months ago

Also I think we'll want to add mirror after performing the deploy, so that we can get the updated connection_info, or even simply update the local challenge with connection_info, and use the new implemented challenge.save() method.

reteps commented 10 months ago

Hi there,

I no longer have time to land this PR, but I have some additional changes on my fork you may want to port over after a lot of testing with my college club. Good luck landing this!

ColdHeat commented 10 months ago

I like the choice of subcommands here. mirror and verify make sense.

In terms of the deploy I think if we can mirror just the connection_info it would be best.

ColdHeat commented 10 months ago

@MilyMilo This seems good to go. Is this still WIP or ready to merge?

MilyMilo commented 10 months ago

Yeah let's add the mirror after sync, I'll do that now.

MilyMilo commented 10 months ago

Okay so some more changes: