Add examples

This commit is contained in:
2026-09-16 21:58:31 +03:00
commit 8ee59bdd9b
21 changed files with 254 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
services:
service:
build: service
restart: always
expose:
- 1337
networks:
- net
environment:
- FLAG=${FLAG}
labels:
- owl.proxy=true
- owl.proxy.port=1337
- owl.label.conntype=http
- owl.label.comment=This is the main service.
networks:
net:
external:
name: ctfd_frp_containers
+9
View File
@@ -0,0 +1,9 @@
FROM python:3.12-alpine
WORKDIR /app
COPY requirements.txt .
RUN pip3 install -r requirements.txt
COPY . .
EXPOSE 1337
CMD ["flask", "--app", "main", "run", "--port", "1337", "--host", "0.0.0.0"]
+18
View File
@@ -0,0 +1,18 @@
from flask import Flask, request
import os
app = Flask(__name__)
FLAG = os.getenv("FLAG")
@app.route("/")
def index():
return "Send POST request to /flag to solve this!", 200
@app.route("/flag", methods=["GET", "POST"])
def flag():
if request.method == "GET":
return "Wrong method!", 400
else:
return FLAG, 200
+7
View File
@@ -0,0 +1,7 @@
blinker==1.8.2
click==8.1.7
Flask==3.0.3
itsdangerous==2.2.0
Jinja2==3.1.4
MarkupSafe==3.0.0
Werkzeug==3.0.4