File size: 1,174 Bytes
0d3476b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import os
import logging
from flask import request, jsonify, send_file, abort
from routes import app

logger = logging.getLogger(__name__)

# routes/ctf.py

import logging
from flask import jsonify
from routes import app  # Assuming 'app' is your Blueprint

logger = logging.getLogger(__name__)

@app.route('/ub5-flags', methods=['GET'])
def ub5_flags():
    """

    GET endpoint that returns UB5 flags in JSON format.

    """
    data = {
        "sanityScroll": {
            "flag": "UB5{w3lc0m3_70_c7f_N0ttyB01}"
        }
        # "openAiExploration": {
        #     "flag": "FLAG_CONTENT_HERE"
        # },
        # "dictionaryAttack": {
        #     "flag": "UB5{FLAG_CONTENT_HERE}",
        #     "password": "PASSWORD_HERE"
        # },
        # "pictureSteganography": {
        #     "flagOne": "UB5-1{FLAG_ONE_CONTENTS_HERE}",
        #     "flagTwo": "UB5-2{FLAG_TWO_CONTENTS_HERE}"
        # },
        # "reverseEngineeringTheDeal": {
        #     "flag": "FLAG_CONTENT_HERE",
        #     "key": "KEY_HERE"
        # }
    }
    
    logger.info("Serving UB5 flags to client.")
    return jsonify(data), 200