sudoBash418
b3831bfb3a
README: mention required CTFd patches
2023-02-24 04:23:22 -07:00
sudoBash418
fe0b4a5251
Add GPLv3 license
2023-02-13 04:42:57 -07:00
sudoBash418
7dd67674f4
README: clarify supported platform, add pipx install method
2023-02-13 03:53:24 -07:00
sudoBash418
2f7ea5e69f
Name static file archives according to challenge ID
...
Makes it easier for players to identify downloaded archives.
2023-01-17 00:04:51 -07:00
sudoBash418
7217383cdd
Implement support for multiple flags per challenge
2023-01-12 01:39:31 -07:00
sudoBash418
5784c98f64
sources/challenges: Sort static file list to avoid spurious archive changes
...
Fixes a bug where repeated deployments would update the file archive,
despite source files remaining the same.
2023-01-12 01:21:47 -07:00
sudoBash418
360731a1f3
deps: Bump minimum version requirement for marshmallow
...
We use the Enum field, introduced in version 3.18.0
2023-01-10 18:36:34 -07:00
sudoBash418
71886cbd47
Release 0.4.0
2023-01-10 18:12:54 -07:00
sudoBash418
feb7adaeca
ctfd/api: Disable HTTP/2
...
With H2 enabled, I kept getting `httpcore.RemoteProtocolError` exceptions.
2023-01-10 17:36:28 -07:00
sudoBash418
3f195635c1
Implement dynamic scoring
...
The scoring parameters of a challenge is based on its difficulty,
and the per-difficulty values are specified in the repository config.
2023-01-10 14:55:40 -07:00
sudoBash418
6c4ae63040
Update dependencies
2023-01-10 14:53:59 -07:00
sudoBash418
288f842b99
commands/shared: Fix initial challenge deployment skipping object creation
...
If the CREATE_NEW flag is set, the other object flags should be implied.
Fixes the issue where newly created challenges would be missing their objects.
2023-01-10 14:50:57 -07:00
sudoBash418
fb92190364
ctfd: Fix invalid flag types
...
If you create a flag without specifying its type, it will have a None type and break things.
So we explicitly set the type to static and check that existing flags match.
2023-01-10 14:42:47 -07:00
sudoBash418
e989b16feb
commands/shared: Swap CRLF for LF when comparing against CTFd description
...
This is necessary because making any changes in CTFd's web UI (such as changing the name)
will convert the description to CRLF newlines.
Seeing "Description" as a pending change is confusing in these cases,
so we just hide that detail from the user.
2022-12-10 22:32:03 -07:00
sudoBash418
c0cfa85250
commands/shared: Only apply changes which we informed the user about
...
Check if we originally planned to make changes before trying to update
tags, hints, flags, or files.
This makes it less likely (but far from impossible) that the actual
changes made differ from the changes we showed to the user.
2022-12-10 22:15:57 -07:00
sudoBash418
3b0db2d7c2
commands: Internal rename from 'required changes' to 'pending changes'
...
Also remove extra newline
2022-12-10 22:13:50 -07:00
sudoBash418
a609e8a813
README: Add usage section for deploy
subcommand
...
- Move `--repo` note to general "Tips" section (applies to `deploy` too)
- Describe how to deploy challenges
- Add short explanation of CTFd URL and API token parameters
2022-12-10 21:26:43 -07:00
sudoBash418
dc64439529
README: Add installation instructions
...
Using my publicly-available self-hosted repo for now.
2022-12-10 21:25:57 -07:00
sudoBash418
915df86ad8
README: Add --skip
usage example; remove annoying shell prompt
...
The shell prompt character tends to get in the way of copy-pasting.
2022-12-10 21:24:33 -07:00
sudoBash418
9b2c953678
Release 0.3.0
...
Also some minor formatting changes
2022-12-10 18:09:46 -07:00
sudoBash418
5171d37bc1
commands/deploy: Add progress spinner for the comparison step
...
Since adding file support, this step now takes a significant amount of time (reading files from disk).
2022-12-10 17:24:14 -07:00
sudoBash418
824c3c12a7
commands: Implement support for files
2022-12-10 17:21:31 -07:00
sudoBash418
a7d54db8a7
ctfd: Add files support
2022-12-10 17:20:25 -07:00
sudoBash418
d47b05a41e
sources/challenge: Implement static file loading
2022-12-10 17:15:23 -07:00
sudoBash418
7af545e210
ctfd/api: Refactor to allow for custom HTTP headers
...
Required for uploading files, and unfortunately HTTPX doesn't seem to support removing a default header set on the client.
2022-12-10 17:13:49 -07:00
sudoBash418
d0e5205a42
ctfd: Avoid changing visiblity of existing challenges
2022-12-10 17:04:43 -07:00
sudoBash418
ac5a4294b3
sources/challenge: Remove now-redundant static config checks
...
Also rename _get_static_files -> _get_matched_static_files to clarify that only files matching user-specified patterns are returned.
2022-12-07 02:32:03 -07:00
sudoBash418
f64fbfef50
StaticConfig: Set default values in attrs class, not schema
...
This makes it easier to create an default object, as we now do (when no [static] section is present)
2022-12-07 02:27:31 -07:00
sudoBash418
2f5412be30
schemas: Fix list reuse as default field values
2022-12-07 02:22:52 -07:00
sudoBash418
7d28dacf4b
Rework CTFd URL + API token input handling
...
- Add API token as a CLI option
- Change CTFd URL to a CLI option (from a required parameter)
- Allow specifying CTFd URL in the challenge repo config
- Allow specifying CTFd URL via an environment variable
2022-11-27 19:31:32 -07:00
sudoBash418
e99c264070
__main__: Silence trio's sys.excepthook RuntimeWarning
2022-11-27 19:21:31 -07:00
sudoBash418
9a5b1dd070
ctfd: Increase timeout for API interactions
2022-11-27 17:46:53 -07:00
sudoBash418
96e941da14
Fix Python 3.10 compatibility
2022-11-26 16:06:03 -07:00
sudoBash418
e359afc049
ctfd: Add support for flags
2022-11-26 02:22:08 -07:00
sudoBash418
cd82e292af
Minor style fixes; ignore a couple of mypy errors
...
The type checker is oblivious to the contract that, if `self.challenges[cid]` is not None, then `self.*[cid]` will not be None
2022-11-26 02:06:01 -07:00
sudoBash418
5ff76e9804
ctfd: Add support for hints
2022-11-25 21:54:17 -07:00
sudoBash418
06066e0ed2
Minor cleanup; sort imports
2022-11-25 21:53:26 -07:00
sudoBash418
7a5217b031
Initial implementation of the deploy command
2022-11-25 20:31:15 -07:00
sudoBash418
10442711cf
Implement initial CTFd API wrapper
2022-11-25 20:14:23 -07:00
sudoBash418
a36e4933b7
Minor style fixes
2022-11-25 20:08:23 -07:00
sudoBash418
d70bea852b
Update dependencies
2022-11-25 20:03:13 -07:00
sudoBash418
540aadc90d
commands/shared: Return gathered information from do_validation
...
Will be used by deploy command.
2022-11-24 00:22:03 -07:00
sudoBash418
e578c6f252
Implement support for listing all challenge issues with ValidationBook.get_issues()
2022-11-24 00:21:12 -07:00
sudoBash418
0fe6a51b60
Properly enable Trio with asyncclick
2022-11-24 00:18:39 -07:00
sudoBash418
f4fd704301
Enable async support w/ anyio + asyncclick
...
- Add anyio, using trio for the backend
- Run the entire app under an event loop
- Swap click for asyncclick, for better async support
- Update dependencies
2022-11-23 22:45:35 -07:00
sudoBash418
c3f1f531c0
commands: Factor out validation code to shared module
...
In preparation for the `deploy` command, which will use the same validation code.
2022-11-23 22:05:29 -07:00
sudoBash418
765385817b
commands/validate: Remove unused ValidationMode enum
2022-11-23 21:51:15 -07:00
sudoBash418
9f8ae89123
util: Add LRU cache to challenge ID hash function
...
This is to avoid constantly re-computing the same hash without having to pass the computed value everywhere.
2022-11-23 17:55:46 -07:00
sudoBash418
009d0ce04f
Implement --skip option to skip challenges based on their ID
2022-11-14 21:31:47 -07:00
sudoBash418
1347eaddc6
Implement sorting for Challenges; sort challenges in validation summary
2022-11-14 21:05:21 -07:00