Skip to content

Instantly share code, notes, and snippets.

@hxlxmjxbbxs
Forked from a-sync/deobf.cmd
Created April 1, 2023 17:25
Show Gist options
  • Save hxlxmjxbbxs/6bf850b07e199ee26194f77bdd10ab87 to your computer and use it in GitHub Desktop.
Save hxlxmjxbbxs/6bf850b07e199ee26194f77bdd10ab87 to your computer and use it in GitHub Desktop.
batch obfuscator / deobfuscator
@echo off & setlocal
if "%~1"=="" exit /b
if /i "%~x1" neq ".bat" if /i "%~x1" neq ".cmd" exit /b
<"%~1" ((for /l %%N in (1 1 8) do pause)>nul&findstr "^">"%~n1__%~x1")
@echo off
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" "%~n1_%~x1"
del "temp.~b64"
copy "%~n1_%~x1" /b + "%~1" /b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment