You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function install() in ctfcli/cli/challenge.py implements a check to see if there is already a challenge with the same name. This check does this as follows:
ifc["name"] ==challenge["name"]:
click.secho(
"Already found existing challenge with same name. Perhaps you meant sync instead of install?",
fg="red",
)
As a result, ctfcli refuses to install challenges with the same name regardless of the category.
I have been using a modified variant of ctfcli that determines if a challenge is already present based on the challenge name and challenge category.
ifc["name"] ==challenge["name"] andc["category"] ==challenge["category"]:
click.secho(
"Already found existing challenge with same name. Perhaps you meant sync instead of install?",
fg="red",
)
The same check is also present in the function sync_challenge() in ctfcli/utils/challenge.py and should be changed in similar fashion to sync the correct challenge.
I guess this is the intended/expected behaviour?
The text was updated successfully, but these errors were encountered:
tieknimmers
changed the title
unable to install challenges with the same name (even if they are in different categories)
Unable to install challenges with the same name (even if they are in different categories)
Dec 12, 2020
tieknimmers
changed the title
Unable to install challenges with the same name (even if they are in different categories)
Unable to install challenges with the same name (but different category)
Dec 12, 2020
Yes the behavior is as intended but there are definitely better ways to determine if a challenge is already installed.
However Im not sure if category is a good additional check b/c what if you were to change the category of a challenge? You would end up with two challenges instead of one.
The function
install()
inctfcli/cli/challenge.py
implements a check to see if there is already a challenge with the same name. This check does this as follows:As a result,
ctfcli
refuses to install challenges with the same name regardless of the category.I have been using a modified variant of
ctfcli
that determines if a challenge is already present based on the challenge name and challenge category.The same check is also present in the function
sync_challenge()
inctfcli/utils/challenge.py
and should be changed in similar fashion to sync the correct challenge.I guess this is the intended/expected behaviour?
The text was updated successfully, but these errors were encountered: