main commit

we add our tool lol
This commit is contained in:
creeper 2026-01-14 14:53:56 +01:00
parent acc2f42db9
commit eafe1d4556
2 changed files with 80 additions and 2 deletions

View File

@ -1,3 +1,21 @@
# RunDecrypt
# Self Extracting Runner (PyInstaller)
This project builds a Windows executable that:
1. Contains a bundled `app.zip`
2. Extracts it to a temporary folder at runtime
3. Runs `app.exe` from inside the extracted files
4. Cleans up the temporary folder after execution
---
## Requirements
- Python 3.8+
- PyInstaller
Install PyInstaller:
```bash
pip install pyinstaller
A simple Project in python which extracts and decrypts your project (base64) and runs it.

60
main.py Normal file
View File

@ -0,0 +1,60 @@
import os
import sys
import zipfile
import tempfile
import subprocess
import shutil
def resource_path(relative_path: str) -> str:
"""
Get absolute path to resource, works for dev and for PyInstaller bundle.
"""
if hasattr(sys, "_MEIPASS"):
return os.path.join(sys._MEIPASS, relative_path)
return os.path.join(os.path.abspath("."), relative_path)
def extract_and_run():
zip_name = "app.zip"
exe_name = "app.exe"
zip_path = resource_path(zip_name)
if not os.path.isfile(zip_path):
print("Payload app.zip not found!")
return 1
temp_dir = tempfile.mkdtemp(prefix="self_extract_")
try:
with zipfile.ZipFile(zip_path, "r") as z:
z.extractall(temp_dir)
exe_path = os.path.join(temp_dir, exe_name)
if not os.path.isfile(exe_path):
print("app.exe not found inside extracted payload!")
return 2
# Run the extracted executable
process = subprocess.Popen(
[exe_path],
cwd=temp_dir,
shell=False
)
process.wait()
return process.returncode
finally:
# Cleanup after execution
try:
shutil.rmtree(temp_dir, ignore_errors=True)
except Exception:
pass
def main():
code = extract_and_run()
sys.exit(code if code is not None else 0)
if __name__ == "__main__":
main()