Rating: 3.0

from flask import Flask, request, render_template, render_template_string, redirect
import subprocess
import urllib
flag = open('flag.txt').read()
app = Flask(__name__)
def main():
return redirect('/login')

def login():
if request.method == 'GET':
return render_template('login.html')
elif request.method == 'POST':
if len(request.values["username"]) >= 40:
return render_template_string("Username is too long!")
elif len(request.values["username"].upper()) <= 50:
return render_template_string("Username is too short!")
return flag
if __name__ == '__main__':
app.run(host='', port=8000)

My [teammate](https://github.com/Fundaystrike) found that `ß` when uppercase is `SS`. So just submit with 25 of them to pass the checks. `ßßßßßßßßßßßßßßßßßßßßßßßßßßß`

Flag: `n00bz{1mp0551bl3_c0nd1t10n5_m0r3_l1k3_p0551bl3_c0nd1t10ns}`

Original writeup (https://jp-ch.gq/web/n00bzCTF-2023.html#conditions).