()
| 11 | |
| 12 | @app.route('/menu', methods=['POST']) |
| 13 | def menu(): |
| 14 | param = request.form['suggestion'] |
| 15 | command = 'echo ' + param + ' >> ' + 'menu.txt' |
| 16 | |
| 17 | os.system(command) |
| 18 | myos.system(command) |
| 19 | system(command) |
| 20 | mysystem(command) |
| 21 | mycall(command) |
| 22 | mypopen(command) |
| 23 | |
| 24 | with open('menu.txt', 'r') as f: |
| 25 | menu_ctx = f.read() |
| 26 | |
| 27 | return render_template('command_injection.html', menu=menu_ctx) |
| 28 | |
| 29 | |
| 30 | if __name__ == '__main__': |