Hack Forums
[Shell] Add Hash to Context Menu of Files in Windows 8 and Windows 10 - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Shell] Add Hash to Context Menu of Files in Windows 8 and Windows 10 (/showthread.php?tid=6003735)



Add Hash to Context Menu of Files in Windows 8 and Windows 10 - Emre_ - Aug 31, 2019

Code
:: Add Hash to Context Menu of Files in Windows 8 and Windows 10

@Echo Off & Cls


net sess>nul 2>&1||(powershell start cmd -ArgumentList """/c %~0""" -verb Runas & exit)

Cls & Mode CON  LINES=11 COLS=60 & Color 0D & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo.
Echo          Add Hash to Context Menu of Files (Y/N)?  
Echo.      
Echo.
Echo.


Set /p input= RESPONSE:

If /i  Not %input%==Y (Goto :_Ex) Else (Goto :_Start)

:_Ex
If /i Not %input%==N  (Goto :EOF) Else (Goto :_RegRestore)



:_Start

Reg.exe add "HKCR\*\shell\hash" /v "MUIVerb" /t REG_SZ /d "Hash" /f >Nul
Reg.exe add "HKCR\*\shell\hash" /v "SubCommands" /t REG_SZ /d "" /f >Nul
REM ; SHA1
Reg.exe add "HKCR\*\shell\hash\shell\01menu" /v "MUIVerb" /t REG_SZ /d "SHA1" /f >Nul
Reg.exe add "HKCR\*\shell\hash\shell\01menu\command" /ve /t REG_SZ /d "powershell -noexit get-filehash -literalpath '%%1' -algorithm SHA1 | format-list" /f >Nul
REM ; SHA256
Reg.exe add "HKCR\*\shell\hash\shell\02menu" /v "MUIVerb" /t REG_SZ /d "SHA256" /f >Nul
Reg.exe add "HKCR\*\shell\hash\shell\02menu\command" /ve /t REG_SZ /d "powershell -noexit get-filehash -literalpath '%%1' -algorithm SHA256 | format-list" /f >Nul
REM ; SHA384
Reg.exe add "HKCR\*\shell\hash\shell\03menu" /v "MUIVerb" /t REG_SZ /d "SHA384" /f >Nul
Reg.exe add "HKCR\*\shell\hash\shell\03menu\command" /ve /t REG_SZ /d "powershell -noexit get-filehash -literalpath '%%1' -algorithm SHA384 | format-list" /f >Nul
REM ; SHA512
Reg.exe add "HKCR\*\shell\hash\shell\04menu" /v "MUIVerb" /t REG_SZ /d "SHA512" /f >Nul
Reg.exe add "HKCR\*\shell\hash\shell\04menu\command" /ve /t REG_SZ /d "powershell -noexit get-filehash -literalpath '%%1' -algorithm SHA512 | format-list" /f >Nul
REM ; MACTripleDES
Reg.exe add "HKCR\*\shell\hash\shell\05menu" /v "MUIVerb" /t REG_SZ /d "MACTripleDES" /f >Nul
Reg.exe add "HKCR\*\shell\hash\shell\05menu\command" /ve /t REG_SZ /d "powershell -noexit get-filehash -literalpath '%%1' -algorithm MACTripleDES | format-list" /f >Nul
REM ; MD5
Reg.exe add "HKCR\*\shell\hash\shell\06menu" /v "MUIVerb" /t REG_SZ /d "MD5" /f >Nul
Reg.exe add "HKCR\*\shell\hash\shell\06menu\command" /ve /t REG_SZ /d "powershell -noexit get-filehash -literalpath '%%1' -algorithm MD5 | format-list" /f >Nul
REM ; RIPEMD160
Reg.exe add "HKCR\*\shell\hash\shell\07menu" /v "MUIVerb" /t REG_SZ /d "RIPEMD160" /f >Nul
Reg.exe add "HKCR\*\shell\hash\shell\07menu\command" /ve /t REG_SZ /d "powershell -noexit get-filehash -literalpath '%%1' -algorithm RIPEMD160 | format-list" /f >Nul
REM ; Allget-filehash -literalpath '%1' -algorithm RIPEMD160 | format-list
Reg.exe add "HKCR\*\shell\hash\shell\08menu" /v "CommandFlags" /t REG_DWORD /d "32" /f >Nul
Reg.exe add "HKCR\*\shell\hash\shell\08menu" /v "MUIVerb" /t REG_SZ /d "Show all" /f >Nul
Reg.exe add "HKCR\*\shell\hash\shell\08menu\command" /ve /t REG_SZ /d "powershell -noexit get-filehash -literalpath '%%1' -algorithm SHA1 | format-list;get-filehash -literalpath '%%1' -algorithm SHA256 | format-list;get-filehash -literalpath '%%1' -algorithm SHA384 | format-list;get-filehash -literalpath '%%1' -algorithm SHA512 | format-list;get-filehash -literalpath '%%1' -algorithm MACTripleDES | format-list;get-filehash -literalpath '%%1' -algorithm MD5 | format-list;get-filehash -literalpath '%%1' -algorithm RIPEMD160 | format-list" /f >Nul




Cls & Mode CON  LINES=11 COLS=60 & Color 0D & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo.
Echo            Adding Hash to Context Menu of Files
Echo.
Echo.
Echo.
Ping -n 6 localhost >Nul
Exit


:_RegRestore

Reg.exe delete "HKCR\*\shell\hash" /f >Nul



Cls & Mode CON  LINES=11 COLS=60 & Color 0D & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo.
Echo            Removing Hash to Context Menu of Files  
Echo.
Echo.
Echo.
Ping -n 6 localhost >Nul
Exit



RE: Add Hash to Context Menu of Files in Windows 8 and Windows 10 - Crimin4L - Sep 1, 2019

Before you release these codes, can you give a brief explanation for people that don't know what these things are (Like me)


RE: Add Hash to Context Menu of Files in Windows 8 and Windows 10 - Emre_ - Sep 1, 2019

(Sep 1, 2019 03:52 PM)Crimin4L Wrote:  Before you release these codes, can you give a brief explanation for people that don't know what these things are (Like me)
I will try to do that next time but my scripts have two options to test the script if you type N you will delete the changes made by my scripts.