blind-command
·
DreamHack/WEB
왜 이리 나만 어려워하는 것인가 #!/usr/bin/env python3from flask import Flask, requestimport osapp = Flask(__name__)@app.route('/' , methods=['GET'])def index(): cmd = request.args.get('cmd', '') if not cmd: return "?cmd=[cmd]" if request.method == 'GET': '' else: os.system(cmd) return cmdapp.run(host='0.0.0.0', port=8000) 문제 코드는 심플하다 get 요청에 대해서 'cmd'(os 아님) 문자열을..