{'context_id': 421, 'vulnerable': True, 'processing': False, 'request': {'url': 'https://humphrey.com/categoriesmain.htm', 'method': 'POST', 'headers': {'HOST': '127.0.0.1:5000', 'USER_AGENT': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0', 'ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'ACCEPT_ENCODING': 'gzip, deflate, br, zstd', 'ORIGIN': 'http://127.0.0.1:5000', 'CONNECTION': 'keep-alive', 'REFERER': 'http://127.0.0.1:5000/sql-injection/login', 'COOKIE': 'csrftoken=7GgBqVlBL6WuGdfu3e6EBXep8N5vFiVm; grafana_session=54c841e9cb2f4956a7c791efd284d120; grafana_session_expiry=1735995560; user_id=2; session_token=b3c634c91e1711c794704a031918a34b', 'UPGRADE_INSECURE_REQUESTS': '1', 'SEC_FETCH_DEST': 'document', 'SEC_FETCH_MODE': 'navigate', 'SEC_FETCH_SITE': 'same-origin', 'SEC_FETCH_USER': '?1', 'PRIORITY': 'u=0, i', 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'Mozilla/5.0 (iPod; U; CPU iPhone OS 3_1 like Mac OS X; et-EE) AppleWebKit/532.47.3 (KHTML, like Gecko) Version/4.0.5 Mobile/8B111 Safari/6532.47.3'}, 'body': b'csrfmiddlewaretoken=74d997d3-449e-444b-9ca8-5c6b9f4986b1&newpass1=xPy8AN7m&newpass2=I226SJHr'}, 'control_flow': {0: "api_key = request.cookies.get('api_key')", 1: 'if API_KEY is None or api_key == API_KEY:', 2: 'return f(*args, **kwargs)', 3: 'pass', 4: "if request.method == 'GET':", 5: 'return sql_injection_login_api(request, app)', 6: 'form = request.form', 7: "username = form.get('username')", 8: "password = form.get('password')", 9: 'password_hash = _hash_password(password)', 10: "md5_pass = hashlib.md5(password.encode('utf-8')).hexdigest()", 11: 'return md5_pass', 12: 'sql = f"SELECT * FROM users WHERE username=\'{username}\' AND password=\'{password_hash}\'"', 13: 'db_result = app.db_helper.execute_read(sql)', 14: 'con = None', 15: 'try:', 16: 'con = self._get_db_connection()', 17: 'return sqlite3.connect(self.DB_FILE_PATH)', 18: 'cur = con.cursor()', 19: 'cur.execute(sql, params)', 20: 'result = cur.fetchall()', 21: 'return result', 22: 'if con is not None:', 23: 'con.close()', 24: 'return result', 25: ')[0] if len(db_result) > 0 else None', 26: 'user = list(', 27: ')[0] if len(db_result) > 0 else None', 28: 'user = list(', 29: 'return render_template(', 30: "'sql_injection/login.html',", 31: 'sql=sql,', 32: 'logged=user is not None', 33: 'return render_template(', 34: '', 35: '<div class="block">', 36: '<pre>', 37: 'Password: Admin123', 38: '<code lang="sql">', 39: '{{ sql }}', 40: '</code>', 41: '{{ sql }}', 42: '</code>', 43: '{{ sql }}', 44: '</div>', 45: '<meta name="viewport" content="width=device-width, initial-scale=1.0">', 46: '<link rel="stylesheet" href="{{ url_for(\'static\', filename=\'assets/bulma.min.css\') }}">', 47: '<title>Vuln Python App</title>', 48: '<body>', 49: '{% include "./components/navbar.html" %}', 50: '<section class="section">', 51: '{% block content %}{% endblock %}', 52: '</div>', 53: '</section>', 54: '', 55: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 56: '', 57: '<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="False" data-target="navbarBasicExample">', 58: '<span aria-hidden="True"></span>', 59: '<span aria-hidden="True"></span>', 60: '</div> -->', 61: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 62: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 63: '', 64: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 65: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 66: '<div id="navbarBasicExample" class="navbar-menu">', 67: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 68: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 69: '<div class="navbar-start">', 70: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 71: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 72: '<a class="navbar-item" href="{{ url_for(\'home\') }}">', 73: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 74: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 75: 'Home', 76: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 77: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 78: '</a>', 79: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 80: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 81: '', 82: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 83: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 84: '<div class="navbar-item has-dropdown is-hoverable">', 85: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 86: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 87: '<a class="navbar-link">', 88: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 89: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 90: 'SQL Injection', 91: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 92: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 93: '</a>', 94: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 95: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 96: '', 97: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 98: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 99: '<div class="navbar-dropdown">', 100: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 101: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 102: '<a class="navbar-item" href="{{ url_for(\'sql_injection_login\') }}">', 103: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 104: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 105: 'Login', 106: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 107: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 108: '</a>', 109: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 110: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 111: '<a class="navbar-item" href="{{ url_for(\'sql_injection_search\') }}?q=">', 112: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 113: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 114: 'Search', 115: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 116: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 117: '</a>', 118: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 119: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 120: '</div>', 121: '<script src="{{ url_for(\'static\', filename=\'assets/global.js\') }}"></script>', 122: '<script src="{{ url_for(\'static\', filename=\'assets/axios.min.js\') }}"></script>', 123: '<script>', 124: "// var googleCaptchaKey = '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI';", 125: '<form action="/sql-injection/login" method="post" style="max-width: 300px;">', 126: '<div class="field">', 127: '<label class="label">Username</label>', 128: '<input class="input" name="username" type="text" placeholder="myuser" required>', 129: '</div>', 130: '</div>', 131: '<label class="label">Password</label>', 132: '<div class="control">', 133: '<input class="input" name="password" type="password" placeholder="********" required>', 134: '</div>', 135: '<div class="field is-grouped">', 136: '<button class="button is-link">Signin</button>', 137: '<div class="notification is-success">', 138: "// var googleCatpchaSecretKey = '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe';", 139: '', 140: "var googleCaptchaKey = '{{ GOOGLE_RECAPTCHA_SITE_KEY }}';", 141: "var googleCatpchaSecretKey = '{{ GOOGLE_RECAPTCHA_SECRET_KEY }}';", 142: '', 143: '</script>', 144: '', 145: '{% block js %}{% endblock %}', 146: '</body>', 147: '</html>', 148: 'None', 149: 'None', 150: 'None', 151: 'None', 152: 'None', 153: '</html>'}, 'response': {'status_code': '204', 'headers': {'Content-Type': 'application/json', 'Content-Length': '4248'}}}