initial commit
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
@echo off
|
||||
rem ============================================================
|
||||
rem Kematian panel setup + start
|
||||
rem Project: https://t.me/electronic_sex
|
||||
rem
|
||||
rem Prompts for the ingest key (and session secret) on first run,
|
||||
rem saves them to panel.env, reuses them on later runs, then
|
||||
rem installs deps and starts the panel with those env vars.
|
||||
rem ============================================================
|
||||
setlocal enabledelayedexpansion
|
||||
cd /d "%~dp0"
|
||||
|
||||
set "CFG=panel.env"
|
||||
|
||||
echo.
|
||||
echo ============================================================
|
||||
echo Kematian panel setup
|
||||
echo Project: https://t.me/electronic_sex
|
||||
echo ============================================================
|
||||
echo.
|
||||
|
||||
rem ---- load existing config or prompt for fresh values ----
|
||||
if exist "%CFG%" (
|
||||
call :loadcfg
|
||||
echo Found existing config: ingest key = !PANEL_INGEST_KEY!
|
||||
set /p redo="Re-enter ingest key and secret? [y/N]: "
|
||||
if /i "!redo!"=="y" set "FRESH=1"
|
||||
) else (
|
||||
set "FRESH=1"
|
||||
)
|
||||
|
||||
if defined FRESH (
|
||||
set /p PANEL_INGEST_KEY="Ingest key (agent PanelAuth must match this) [CHANGE-ME]: "
|
||||
if "!PANEL_INGEST_KEY!"=="" set "PANEL_INGEST_KEY=CHANGE-ME"
|
||||
set /p PANEL_SECRET="Panel session secret (press Enter for random): "
|
||||
if "!PANEL_SECRET!"=="" set "PANEL_SECRET=%RANDOM%%RANDOM%%RANDOM%"
|
||||
>"%CFG%" (
|
||||
echo PANEL_INGEST_KEY=!PANEL_INGEST_KEY!
|
||||
echo PANEL_SECRET=!PANEL_SECRET!
|
||||
)
|
||||
echo Saved to %CFG%
|
||||
)
|
||||
|
||||
call :loadcfg
|
||||
|
||||
echo.
|
||||
echo Using ingest key : %PANEL_INGEST_KEY%
|
||||
echo Using secret : %PANEL_SECRET%
|
||||
echo.
|
||||
|
||||
echo [1/2] Installing Python dependencies...
|
||||
python -m pip install -r requirements.txt
|
||||
if errorlevel 1 (
|
||||
echo.
|
||||
echo [!] pip install failed. Make sure Python is on PATH.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo [2/2] Starting panel...
|
||||
echo.
|
||||
echo First run? Open http://localhost:5000/setup to create the admin
|
||||
echo account, then http://localhost:5000/ to log in.
|
||||
echo.
|
||||
echo When building an agent, set PanelAuth / ingest key to:
|
||||
echo %PANEL_INGEST_KEY%
|
||||
echo.
|
||||
echo Press Ctrl+C to stop the panel.
|
||||
echo.
|
||||
python app.py
|
||||
pause
|
||||
exit /b 0
|
||||
|
||||
rem ---- read KEY=VALUE lines from the config file ----
|
||||
:loadcfg
|
||||
if not exist "%CFG%" exit /b 0
|
||||
for /f "usebackq tokens=1,* delims==" %%a in ("%CFG%") do set "%%a=%%b"
|
||||
exit /b 0
|
||||
Reference in New Issue
Block a user