Skip to content

Instantly share code, notes, and snippets.

@0xdade
Created August 2, 2019 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xdade/03843a7ba7cc7ede3139bcdf0b2ca63d to your computer and use it in GitHub Desktop.
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.
#!/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