Skip to content

Instantly share code, notes, and snippets.

@Archigos
Created July 29, 2014 14:54
Show Gist options
  • Save Archigos/caa0e2723c152bfec029 to your computer and use it in GitHub Desktop.
Save Archigos/caa0e2723c152bfec029 to your computer and use it in GitHub Desktop.
Create MD5 Hash of File Requires PHP to be installed.
@ECHO OFF && SETLOCAL ENABLEEXTENSIONS && SETLOCAL ENABLEDELAYEDEXPANSION
TITLE %COMSPEC% && COLOR 07
PUSHD . && CLS
IF "%~1" == "/?" GOTO Help ELSE GOTO Beginning
IF "%~1" == "" GOTO Help ELSE GOTO Beginning
:Beginning
ECHO.
PHP -r "print (md5('%~1'));"
ECHO.
GOTO EOF
:Help
ECHO.
ECHO Use "MD5 <PASSWORD>" to genereate the MD5 Hash
GOTO EOF
:EOF
POPD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment