Skip to main content

Flask Core

This is a reusable core used to back COMP6443 applications.

Overview

Flask Core is intended to be an installable Pip package to which Flask blueprints can be attached to.

Configuration Variables

TBA

Config Environment Variables

Flask Core accepts some configuration through environment variables.

FLAG_IDS

Required

Comma seperated list of a id for every flag on this site, these ids can then be used with current_app.gen_flag(zid,flag_id) to generate a actual flag. The id is just used so you can generate the same flag in multiple places and also so the /core/checker site works.

FLAG_WRAP

Required

This is what generated flags are wrapped in, i.e if you set FLAG_WRAP to BREAK1 then all flags will be in the format BREAK1{abc...}

FLAG_SECRET

Required

This is the secret key which flask will use to generate flags via the current_app.gen_flag(zid,flag_id)

DB_CONNECTION_STRING

Required

URI used to connect to a database.

Example:

postgres://root:root@localhost/test

FLASK_CORE_CONFIG

Default: None

When pointed to a valid pyconf file, this sets the contained options within Flask and Flask Core.

Example pyconf:

THEME = "flatly"
TITLE = "A Title"

FLASK_CORE_ENABLE_AUTH

Default: True

Enforces user authentication.

FLASK_CORE_ENABLE_ISOLATION

Default: True

Isolates each user's database connection. Depends on user's authentication to function.

FLASK_CORE_AUTO_GENERATED_FLAGS

Default: True

Greps for flags in responses and replaces them with a user specific auto generated flag. Relies on auth.

Flag Generation

If you have auto flag generation turned on just stats all the flag_ids in the enviornment variable then you can either do

current_app.gen_flag(zid,flag_id)

to generate a flag or actually just put the string

FLAG{_flagid}

in any response and it'll get auto grepped out and replaced with a actual flag.

i.e

FLAG_IDS=xss,csrf

chuck in the response

FLAG{_xss}

and it'll get replaced :)

Metadata

Release files for flask-core 2.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flask-core 2.9.0
File Size Uploaded
flask-core-2.9.0.tar.gz 13.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flask-core 2.9.0
File Interpreter ABI Platform
flask_core-2.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 32.7 kB

Release files / flask-core-2.9.0.tar.gz

Download URL flask-core-2.9.0.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
80f5a2bb0b57363e76f989fb57fbffe05946c6c132d9dc9d075f4c1c54d30c95
BLAKE2b-256 checksum
How to use checksums
977d2031fb7b229d75fcd0bd0b345dc8de53043da1983dc959f77f4d8b67c613
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0

Release files / flask_core-2.9.0-py3-none-any.whl

Download URL flask_core-2.9.0-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24c2c3301f26a4366a3af39434bface0fcb074de2d6f71db03028fb72a4e1de0
BLAKE2b-256 checksum
How to use checksums
03819ba445413bfabf645576918e8fb918c0c404d26a8908844f688a6d084d24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0

Release history Release notifications | RSS feed

This release

2.9.0 This release

2 release files

2.8.1

2 release files

2.8.0

2 release files

2.7.0

2 release files

2.6.0

2 release files

2.5.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page