Basta tentar este arquivo em lote para codificar seu arquivo com base64 usando o utilitário de comando certutil
arrastando e soltando seu arquivo sobre ele:
@echo off
Title Encoding Batch Files With CERTUTIL Utility by Hackoo 2017
color 0A & Mode 80,5
If "%~1"=="" (
color 0C & Mode 80,3
echo(
echo You should drag and drop a file over this batch script to be encoded !
Timeout /T 5 /nobreak>nul & exit /b
)
@for /f %%i in ("certutil.exe") do if not exist "%%~$path:i" (
echo CertUtil.exe not found.
pause
exit /b
)
>"temp.~b64" echo(//4mY2xzDQo=
set "BOM_File=%~n1"
certutil.exe -f -decode "temp.~b64" "%BOM_File%"
del "temp.~b64"
@Copy "%BOM_File%" /b + "%~1" /b >nul 2>&1
set "TempFile=%Temp%\Temp_b64
set "OutputFile=%BOM_File%_encoded%~x0"
If exist "%OutputFile%" Del "%OutputFile%" >nul 2>&1
echo(
certutil.exe -f -encode "%BOM_File%" "%TempFile%"
(
echo @echo off
echo Title Execution of "%~nx1" by Hackoo 2017
echo CERTUTIL -f -decode "%%~f0" "%%Temp%%\%~nx1" ^>nul 2^>^&1
echo Start "" "%%Temp%%\%~nx1"
echo Exit
)> "%OutputFile%"
@Copy "%OutputFile%" /b + "%TempFile%" /b >nul 2>&1
If exist "%TempFile%" Del "%TempFile%" >nul 2>&1
If exist "%BOM_File%" Del "%BOM_File%" >nul 2>&1
Timeout /T 2 /NoBreak>nul