Skip to content

Instantly share code, notes, and snippets.

@delic
Created June 27, 2019 08:02
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 delic/da12e7b98ecd2ae3e4d57e8bf94e7337 to your computer and use it in GitHub Desktop.
Save delic/da12e7b98ecd2ae3e4d57e8bf94e7337 to your computer and use it in GitHub Desktop.
Test server I use for testing my changes to ffuf
#!/usr/bin/env python3
# requires flask (pip install flask)
from flask import Flask
app = Flask(__name__)
@app.route('/size/<path:path>', methods=['GET', 'POST'])
def size(path):
return int(path)*'A'
@app.route('/words/<path:path>', methods=['GET', 'POST'])
def words(path):
return " ".join(int(path)*['ABCDEF'])
@app.route('/status/<path:path>', methods=['GET', 'POST'])
def status(path):
return f"returning status code {path}", int(path)
if __name__ == '__main__':
app.run(port=4000, debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment