Skip to main content

Programmable

Programmable Flag

caution

Programmable flags are only available on Hosted or Enterprise CTFd instances

Programmable keys allow you to use Python code to check user submissions when static or regex flags are not flexible enough.

A check function is a Python function taking a single argument. The argument provided will be the user's input. The function should then return a Boolean indicating whether the user was correct or not.

Example:

def check(x):
if x == "flag{this_is_the_answer}":
return True
else:
return False

Was this page helpful?