I have a batch file that I need to obfuscate. Instead of just obfuscating all of it I just want to obfuscate parts of it. is that possible? The example file is called test.bat
test.bat
Code: Select all
@echo off
echo this part isint hidden.
pause
goto axtb
:axtb
cls
echo this part is hidden.
pause
exit
obfu.bat
Code: Select all
set filename="sd"
set source="engine"
if exist temp.~b644 goto n
if not exist %filename%.bat exit
"%source%.cmd" "%filename%.bat"
:n
del %filename%.bat
::ping localhost -n 2 >nul
ren t.bat %filename%.bat
"%source%.cmd" "%filename%.bat"
Code: Select all
if "%~1"=="" exit /b
if /i "%~x1" neq ".bat" if /i "%~x1" neq ".cmd" 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=
certutil.exe -f -decode "temp.~b64" "t.bat"
del "temp.~b64"
::ping localhost -n 1 >nul
copy "t.bat" /b + "%~1" /b
echo .>temp.~b644
::ping localhost -n 1 >nul
start obfu.bat
exit
Thanks Rasil