Skip to content

Instantly share code, notes, and snippets.

@lxfly2000
Last active September 18, 2023 06:58
Show Gist options
  • Save lxfly2000/ef5f26ab459675789362a106280b7b02 to your computer and use it in GitHub Desktop.
Save lxfly2000/ef5f26ab459675789362a106280b7b02 to your computer and use it in GitHub Desktop.
使用时把脚本放到SendTo文件夹
@echo off
if "%~1"=="" (
echo 未指定文件。
goto :end
)
for %%i in (%*) do call :calchash %%i
:end
if "%~0"=="%~dpnx0" pause
goto :eof
:calchash
echo %~nx1 的 MD5:
certutil -hashfile %1 MD5|findstr /r "^[0-9a-fA-F]*$"
echo %~nx1 的 SHA1:
certutil -hashfile %1 SHA1|findstr /r "^[0-9a-fA-F]*$"
echo %~nx1 的 SHA256:
certutil -hashfile %1 SHA256|findstr /r "^[0-9a-fA-F]*$"
goto :eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment