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
+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 9339
CMD ["flask", "--app", "main", "run", "--port", "9339", "--host", "0.0.0.0"]
+10
View File
@@ -0,0 +1,10 @@
from flask import request
import flask
app = flask.Flask(__name__)
@app.route("/")
def index():
return "This is the second service!", 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
+33
View File
@@ -0,0 +1,33 @@
version: "3"
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.
bot:
build: bot
restart: always
expose:
- 9339
networks:
- net
labels:
- owl.proxy=true
- owl.proxy.port=9339
- owl.label.conntype=http
- owl.label.comment=This is a bot 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"]
+1
View File
@@ -0,0 +1 @@
CTFd{s4n1ty_ch3ck}
+18
View File
@@ -0,0 +1,18 @@
from flask import request
import flask
app = flask.Flask(__name__)
@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 open("./flag", "r", encoding="utf-8").read(), 200
+1
View File
@@ -0,0 +1 @@
Flask==3.0.3