We have a new CTF we want to run and I’m trying to import the questions, etc over an existing CTF. The issue is that we’re getting a silent failure when doing this. There is no progress bar and it doesn’t error out.
Can you let me know what to do to find an error? I’ve tried running the application within the CLI and it’s not giving anything of value output-wise.
What happens if you try to import with the import.py script? Are there any related stack traces?
Is there an effective way to get a CLI into the docker container so I can perform the import.py there?
I did it from the CLI of the box hosting docker and this is my output after installing requirements.txt:
[email protected]:~# python /etc/docker/compose/ctfd/import.py ~ubuntu/export.zip
* Loaded module, <module 'CTFd.plugins.challenges' from '/etc/docker/compose/ctfd/CTFd/plugins/challenges/__init__.py'>
* Loaded module, <module 'CTFd.plugins.ctfd-event-countdown' from '/etc/docker/compose/ctfd/CTFd/plugins/ctfd-event-countdown/__init__.py'>
* Loaded module, <module 'CTFd.plugins.dynamic_challenges' from '/etc/docker/compose/ctfd/CTFd/plugins/dynamic_challenges/__init__.py'>
* Loaded module, <module 'CTFd.plugins.flags' from '/etc/docker/compose/ctfd/CTFd/plugins/flags/__init__.py'>
* Loaded module, <module 'CTFd.plugins.multiple_choice' from '/etc/docker/compose/ctfd/CTFd/plugins/multiple_choice/__init__.py'>
Failed to disable foreign key checks. Continuing.
No handlers could be found for logger "root"
This is unrelated, but I’d also like to know an easy way to create users following a schema. This is in User Mode, not Team Mode.
You can typically jump into a Docker container with
docker exec. See here for some examples: https://docs.docker.com/engine/reference/commandline/exec/