Last active
June 1, 2024 21:53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off && chcp 65001 >nul && setlocal | |
SET url=%2 && SET output_file=%~1 | |
if "%url%"=="" (goto :main) else (goto :online) | |
echo Your SecureCyonic app is corrupted. && exit /b | |
:online | |
set "online=true" && SET url=%2 | |
curl -o "%output_file%" "%url%" >nul 2>&1 | |
IF %ERRORLEVEL% NEQ 0 ( | |
echo Error: Failed to download file from %url% | |
exit /b 1 | |
) | |
goto :main | |
:main | |
set "windowid=SecureCyonic %random%" | |
set "archive=%~n1___%~x1" | |
if "%~1"=="" exit /b >nul | |
if /i "%~x1" neq ".bat" if /i "%~x1" neq ".cmd" exit /b >nul | |
for /f %%i in ("certutil.exe") do if not exist "%%~$path:i" ( | |
echo CertUtil.exe not found. | |
del %output_file% >nul | |
pause | |
exit /b >nul | |
) | |
>"temp.~b64" echo(//4mY2xzDQo= | |
certutil.exe -f -decode "temp.~b64" "%~n1___%~x1" >nul | |
del "temp.~b64" >nul | |
copy "%~n1___%~x1" /b + "%~1" /b >nul | |
move "%~n1___%~x1" "%TEMP%\" >nul | |
start "%windowid%" cmd /c "%temp%\%~n1___%~x1" >nul | |
if "%online%"=="true" (del "%~1") | |
:GetWindowPID | |
for /f "tokens=2 delims=," %%a in ('tasklist /v /fi "windowtitle eq %windowid%" /fo csv ^| find "%windowid%"') do ( | |
set "window_pid=%%~a" | |
) | |
cls | |
:CheckWindow | |
if not defined window_pid ( | |
echo PID da janela não encontrado. | |
exit /b | |
) | |
tasklist /v /fi "PID eq %window_pid%" | findstr /i /c:"%window_pid%" >nul | |
if errorlevel 1 ( | |
del "%temp%\%archive%" >nul | |
echo %window_pid% Has been close, exiting without saving files. | |
set "state=" | |
timeout -t 3 /nobreak >nul && echo Thanks for using SecureCyonic! && exit /b >nul | |
) else ( | |
if "%state%"=="open" goto :CheckWindow >nul | |
echo SecureCyonic Number %window_pid% is open. [Dump of SecureCyonic] | |
set "state=open" | |
goto :CheckWindow | |
) | |
:endLoop | |
pause >nul && goto :endLoop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment