Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
5067_Labs/Requests/RequestsTrainer/app.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
49 lines (31 sloc)
859 Bytes
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
""" | |
Very simple Flask App. For Testing | |
""" | |
import json | |
import flask | |
from .meta import app | |
#app = flask.Flask(__name__) | |
HTTP_METHODS = ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'TRACE', 'PATCH'] | |
import logging | |
@app.route('/') | |
def main(): | |
#payload = flask.request.args.get("payload") | |
return flask.render_template('index.html') | |
@app.route("/admin") | |
def admin(): | |
return flask.render_template('admin.html') | |
@app.route("/my") | |
@app.route("/my/admin/") | |
def enum(): | |
return flask.render_template('enum.html') | |
@app.route("/my-sql") | |
def badEnum(): | |
flask.abort(403) | |
return "foo" | |
@app.route("/my-sql/admin") | |
@app.route("/my/admin/spider") | |
def enumSuccess(): | |
#Can i get the route | |
# flask.request.route | |
return flask.render_template('enum.html', | |
success=True) | |