mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
12 lines
260 B
Python
12 lines
260 B
Python
from flask import Flask, request
|
|||
import subprocess
|
|||
|
|||
app = Flask(__name__)
|
|||
|
|||
|
|||
@app.route('/shell_default_safe')
|
|||
def shell_default_safe():
|
|||
cmd = request.args.get('cmd')
|
|||
result = subprocess.run([cmd], capture_output=True)
|
|||
return result.stdout.decode()
|