Closed MilyMilo closed 1 year 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.
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!
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.
@MilyMilo This seems good to go. Is this still WIP or ready to merge?
Yeah let's add the mirror after sync, I'll do that now.
Okay so some more changes:
connection_info
will be added to the challenge.yml after deploymentchallenge format
command to enforce the formatting used by ctfcli. It's pretty simple but running mirror
will output challenge.yml files in that format, so if we want to be consistent we might as well format everything the same way.
Adds
ctf challenge mirror <challenge>
andctf challenge verify <challenge>
adapted from #106Originally, this functionality was called
pull
andverify
- however,push
is already used to push challenge changes to the git repository. I thinkmirror
is a better name, as ctfcli will attempt to mirror / copy the remote state from ctfd. This waypull
stays in its current git-like form, for git-related operations.More additions:
files_directory_name
(defaulting todist
) to specify where ctfcli should download the files, relative to challenge.ymlctf challenge verify
will exit with status code 2 if the verification was successful, but some challenges are out of sync.Thanks to @reteps for the initial contribution!
Closes: #101 #106