diff --git a/CTFd/models/__init__.py b/CTFd/models/__init__.py index b49537b5a..398f64fd4 100644 --- a/CTFd/models/__init__.py +++ b/CTFd/models/__init__.py @@ -85,6 +85,7 @@ class Challenges(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(80)) description = db.Column(db.Text) + connection_info = db.Column(db.Text) max_attempts = db.Column(db.Integer, default=0) value = db.Column(db.Integer) category = db.Column(db.String(80)) diff --git a/CTFd/plugins/challenges/__init__.py b/CTFd/plugins/challenges/__init__.py index 8c7c4f2bc..110b2c821 100644 --- a/CTFd/plugins/challenges/__init__.py +++ b/CTFd/plugins/challenges/__init__.py @@ -53,6 +53,7 @@ def read(cls, challenge): "name": challenge.name, "value": challenge.value, "description": challenge.description, + "connection_info": challenge.connection_info, "category": challenge.category, "state": challenge.state, "max_attempts": challenge.max_attempts, diff --git a/CTFd/plugins/dynamic_challenges/__init__.py b/CTFd/plugins/dynamic_challenges/__init__.py index e5d511bcc..c9db56617 100644 --- a/CTFd/plugins/dynamic_challenges/__init__.py +++ b/CTFd/plugins/dynamic_challenges/__init__.py @@ -102,6 +102,7 @@ def read(cls, challenge): "decay": challenge.decay, "minimum": challenge.minimum, "description": challenge.description, + "connection_info": challenge.connection_info, "category": challenge.category, "state": challenge.state, "max_attempts": challenge.max_attempts, diff --git a/CTFd/themes/admin/templates/challenges/update.html b/CTFd/themes/admin/templates/challenges/update.html index a1fe4050e..f1de26653 100644 --- a/CTFd/themes/admin/templates/challenges/update.html +++ b/CTFd/themes/admin/templates/challenges/update.html @@ -34,6 +34,18 @@ {% endblock %} + {% block connection_info %} +