INNER CODE UNIT · Python
home
The-Art-of-Hacking/websploit · additional-labs/token-tower/app.py:488
def home():
return HOME_PAGE
@app.route('/login', methods=['GET', 'POST'])
def login():
if request.method == 'GET':
return LOGIN_PAGE
username = request.form.get('username', '')
password = request.form.get('password', '')
algorithm = request.form.get('algorithm', 'HS256')
# Check credentials
if username not in USERS or USERS[username]['password'] != password:
return render_template_string("""
<!DOCTYPE html>
<html>