【问题标题】:Can someone help me understand the code that obfuscated my file so that I can reverse it? [duplicate]有人可以帮助我理解混淆我的文件的代码,以便我可以反转它吗? [复制]
【发布时间】:2020-08-17 20:20:19
【问题描述】:

最近我混淆了自己的密码保护代码并使用了

@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" "%~n1o%~x1"
del "temp.~b64"
copy "%~n1o%~x1" /b + "%~1" /b

我不知道我应该如何反转它以便我可以更改我的密码。

【问题讨论】:

  • 我想补充一点,它使我的代码变成了普通话
  • 你从哪里得到这个脚本?不要忘记添加它的参考或链接!

标签: batch-file


【解决方案1】:

参考这个答案herehere too


您可以将您的混淆文件拖放到此批处理文件上,以便读取并返回您的原始代码!

@echo off
if "%~1"=="" exit /b
if /i "%~x1" neq ".bat" if /i "%~x1" neq ".cmd" exit /b
if exist "%~n1___%~x1" del "%~n1___%~x1"
for /f "skip=1 delims=" %%L in ('CMD /U /C Type "%~1"') do (
   echo %%L
   echo %%L >>"%~n1___%~x1"
)
pause>nul

或者这个:

@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")

【讨论】:

  • 非常感谢!我为我的朋友做了一个批处理工具,现在我可以为他更改密码了!老实说,你是一个很好的人。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-09-04
  • 2021-12-24
  • 1970-01-01
相关资源
最近更新 更多