Rating: 3.0

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

@app.route('/login',methods=['GET','POST'])
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!")
else:
return flag
if __name__ == '__main__':
app.run(host='0.0.0.0', 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).