Advertisement
FreeBooter

Hash

Aug 20th, 2022
1,401
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 3.84 KB | Fixit | 1 0
  1. :: Add Hash to Context Menu of Files in Windows 8, Windows 10 and Windows 11
  2.  
  3. @Echo Off & Cls
  4.  
  5.  
  6. net sess>nul 2>&1||(powershell start cmd -ArgumentList """/c %~0""" -verb Runas & exit)
  7.  
  8. Cls & Mode CON  LINES=11 COLS=60 & Color 0E & Title Created By FreeBooter
  9. Echo.
  10. Echo.
  11. Echo.
  12. Echo.
  13. Echo          Add Hash to Context Menu of Files (A)  
  14. Echo.      
  15. Echo          Remove Hash from Context Menu     (R)
  16. Echo.
  17.  
  18.  
  19. Set /p input=^>
  20.  
  21. If /i  Not %input%==A (Goto :_Ex) Else (Goto :_Enable)
  22.  
  23. :_Ex
  24. If /i Not %input%==R  (Goto :EOF) Else (Goto :_RegRestore)
  25.  
  26.  
  27.  
  28. :_Enable
  29.  
  30. Reg.exe add "HKCR\*\shell\hash" /v "MUIVerb" /t REG_SZ /d "Hash" /f >Nul
  31. Reg.exe add "HKCR\*\shell\hash" /v "SubCommands" /t REG_SZ /d "" /f >Nul
  32. REM ; SHA1
  33. Reg.exe add "HKCR\*\shell\hash\shell\01menu" /v "MUIVerb" /t REG_SZ /d "SHA1" /f >Nul
  34. 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
  35. REM ; SHA256
  36. Reg.exe add "HKCR\*\shell\hash\shell\02menu" /v "MUIVerb" /t REG_SZ /d "SHA256" /f >Nul
  37. 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
  38. REM ; SHA384
  39. Reg.exe add "HKCR\*\shell\hash\shell\03menu" /v "MUIVerb" /t REG_SZ /d "SHA384" /f >Nul
  40. 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
  41. REM ; SHA512
  42. Reg.exe add "HKCR\*\shell\hash\shell\04menu" /v "MUIVerb" /t REG_SZ /d "SHA512" /f >Nul
  43. 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
  44. REM ; MACTripleDES
  45. Reg.exe add "HKCR\*\shell\hash\shell\05menu" /v "MUIVerb" /t REG_SZ /d "MACTripleDES" /f >Nul
  46. 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
  47. REM ; MD5
  48. Reg.exe add "HKCR\*\shell\hash\shell\06menu" /v "MUIVerb" /t REG_SZ /d "MD5" /f >Nul
  49. 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
  50. REM ; RIPEMD160
  51. Reg.exe add "HKCR\*\shell\hash\shell\07menu" /v "MUIVerb" /t REG_SZ /d "RIPEMD160" /f >Nul
  52. 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
  53. REM ; Allget-filehash -literalpath '%1' -algorithm RIPEMD160 | format-list
  54. Reg.exe add "HKCR\*\shell\hash\shell\08menu" /v "CommandFlags" /t REG_DWORD /d "32" /f >Nul
  55. Reg.exe add "HKCR\*\shell\hash\shell\08menu" /v "MUIVerb" /t REG_SZ /d "Show all" /f >Nul
  56. 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
  57.  
  58.  
  59.  
  60.  
  61. Cls & Mode CON  LINES=11 COLS=60 & Color 0E & Title Created By FreeBooter
  62. Echo.
  63. Echo.
  64. Echo.
  65. Echo.
  66. Echo            Adding Hash to Context Menu of Files
  67. Echo.
  68. Echo.
  69. Echo.
  70. Ping -n 6 localhost >Nul
  71. Exit
  72.  
  73.  
  74. :_RegRestore
  75.  
  76. Reg.exe delete "HKCR\*\shell\hash" /f >Nul
  77.  
  78.  
  79.  
  80. Cls & Mode CON  LINES=11 COLS=60 & Color 0E & Title Created By FreeBooter
  81. Echo.
  82. Echo.
  83. Echo.
  84. Echo.
  85. Echo            Removing Hash from Context Menu  
  86. Echo.
  87. Echo.
  88. Echo.
  89. Ping -n 6 localhost >Nul
  90. Exit
  91.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement