#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2016-05-18 12:20:12 # @Author : PiaoYun(piaoyunsoft@163.com) # @Link : http://www.dllhook.com # @Version : 1.0.0 import os from flask import Flask, request app = Flask(__name__) def getArgs(key): if request.method == 'POST': return request.form.get(key, None) else: return request.args.get(key, None) @app.route('/test.php', methods=['GET', 'POST']) @app.route('/test.asp', methods=['GET', 'POST']) @app.route('/test.jsp', methods=['GET', 'POST']) def hello_world(): #params = request.args.items() #return params.__str__() username = getArgs('username') password = getArgs('password') if username == None: return 'username == None' if password == None: return 'password == None' return username + ' ' + password if __name__ == '__main__': app.run(host='127.0.0.1', port=80, debug=True)
发表评论