Created
August 2, 2019 20:06
-
-
Save 0xdade/03843a7ba7cc7ede3139bcdf0b2ca63d to your computer and use it in GitHub Desktop.
Simple flask app that prints POST data to the console. Useful for testing open redirects and other things where you can control where something get's POSTed.
This file contains 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
#!/usr/bin/env python | |
from flask import Flask, request, Response | |
app = Flask(__name__) | |
@app.route('/', defaults={'path': ''}, methods=['GET', 'POST']) | |
@app.route('/<path:path>', methods=['GET', 'POST']) | |
def catch_all(path): | |
if request.form: | |
print('Form:' + str(request.form)) | |
if request.data: | |
print('Data:' + str(request.data)) | |
return '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment