{'context_id': 434, 'vulnerable': True, 'processing': False, 'request': {'url': 'http://www.silva.org/posts/main/postsauthor.html', 'method': 'PATCH', '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', 'CONNECTION': 'keep-alive', 'REFERER': 'http://127.0.0.1:5000/sql-injection/search?q=ertgetert', '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 (Macintosh; PPC Mac OS X 10_9_1 rv:4.0; szl-PL) AppleWebKit/533.29.6 (KHTML, like Gecko) Version/5.0.3 Safari/533.29.6'}, 'body': b'csrfmiddlewaretoken=153a2d2e-2bbc-42e5-823f-ab6092b9281f&newpass1=UvGGqZKs&newpass2=cGdZiibQ'}, '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: 'return sql_injection_search_page(request, app)', 5: "search = request.args.get('q')", 6: 'sql = f"SELECT * FROM products WHERE name LIKE \'%{search}%\'"', 7: 'db_result = app.db_helper.execute_read(sql)', 8: 'con = None', 9: 'try:', 10: 'con = self._get_db_connection()', 11: 'return sqlite3.connect(self.DB_FILE_PATH)', 12: 'cur = con.cursor()', 13: 'cur.execute(sql, params)', 14: 'result = cur.fetchall()', 15: 'return result', 16: 'if con is not None:', 17: 'con.close()', 18: 'return result', 19: 'products = list(', 20: 'map(', 21: 'lambda p: {', 22: 'db_result', 23: 'map(', 24: 'products = list(', 25: "'id': p[0],", 26: "'name': p[1],", 27: "'price': p[2]", 28: 'lambda p: {', 29: 'return render_template(', 30: "'sql_injection/search.html',", 31: 'sql=sql,', 32: 'products=products', 33: 'return render_template(', 34: '', 35: '<div class="block">', 36: '<pre>', 37: '</pre>', 38: '', 39: '<div class="block">', 40: '<form action="/sql-injection/search" method="get" style="max-width: 300px;">', 41: '<div class="block">', 42: '<form action="/sql-injection/search" method="get" style="max-width: 300px;">', 43: '<div class="block">', 44: '<div class="field">', 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: '<input class="input" name="q" type="text" placeholder="product...">', 126: '</div>', 127: '</div>', 128: '<div class="field is-grouped">', 129: '<div class="control">', 130: '<button class="button is-link">Search</button>', 131: '</div>', 132: '</form>', 133: '</div>', 134: '', 135: '<div class="block">', 136: '<thead>', 137: '<tr>', 138: '<th>ID</th>', 139: '<th>Name</th>', 140: '<th>Price</th>', 141: '</tr>', 142: '</thead>', 143: '', 144: '<tbody>', 145: '{% for product in products %}', 146: "// var googleCatpchaSecretKey = '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe';", 147: '', 148: "var googleCaptchaKey = '{{ GOOGLE_RECAPTCHA_SITE_KEY }}';", 149: "var googleCatpchaSecretKey = '{{ GOOGLE_RECAPTCHA_SECRET_KEY }}';", 150: '', 151: '</script>', 152: '', 153: '{% block js %}{% endblock %}', 154: '</body>', 155: '</html>', 156: 'None', 157: 'None', 158: 'None', 159: 'None', 160: 'None', 161: '</html>'}, 'response': {'status_code': '502', 'headers': {'Content-Type': 'application/json', 'Content-Length': '4135'}}}