Перейти к основному содержанию

Хэш-суммы в контекстном меню Windows (MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512)

code

Иногда нужно вычислить хэш-сумму файла. Значение хэш-суммы может потребоваться для проверки целостности файла, идентификации файла, поиска файла в глобальной сети.

В Windows есть встроенные утилиты для вычисления хэш-суммы, однако пользоваться ими неудобно. Сделаем, чтобы было удобно. Добавим вычисление хэш-сумм в контекстное меню Windows. Поддерживаются алгоритмы: MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512. Нам не потребуется установка дополнительных программ, только прямые руки.

Я разрабатывал меню для Windows 10. В Windows 11 тоже работает, без подсветки при использовании Windows Terminal. В других версиях меню может заработать, или не заработать.

Результат выглядит так

Зажимаем Shift и кликаем правой кнопкой мыши на файл:

hash

В контекстном меню появляется пункт "Хэш-сумма файла". При наведении отображается список поддерживаемых алгоритмов. Выбираем алгоритм, открывается командная строка с вычисленной хэш-суммой:

hash

Все варианты:

hash

Для больших файлов расчёт хэш-суммы может занимать продолжительное время. Для расчёта используется встроенная в Windows утилита certutil.

Вторая версия добавляет название алгоритма и путь к файлу.

code

Плюсы контекстного меню

  • Не требует установки дополнительных программ.
  • Установка и удаление одним кликом.
  • Запускается для каждого файла отдельно.
  • Можно свернуть окно и продолжить работу.
  • Из окна командной строки хэш-сумму можно скопировать
  • Отображается только для контекстного меню, вызванного с шифтом, не мозолит глаза.

Установка контекстного меню

REG файлы для установки и удаления контекстного меню "internet-lab.ru hash".

  • Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\*\shell\internet-lab.ru]
    "Extended"=""
    "MUIVerb"="Хэш-сумма файла"
    "SubCommands"="internet-lab.ru.MD2;internet-lab.ru.MD4;internet-lab.ru.MD5;internet-lab.ru.SHA1;internet-lab.ru.SHA256;internet-lab.ru.SHA384;internet-lab.ru.SHA512;internet-lab.ru.hash.about"
    "Position"="Top"
    "Icon"="imageres.dll,275"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.MD2]
    @="MD2"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.MD4]
    @="MD4"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.MD5]
    @="MD5"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA1]
    @="SHA1"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA256]
    @="SHA256"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA384]
    @="SHA384"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA512]
    @="SHA512"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.hash.about]
    @="О меню"
    "CommandFlags"=dword:00000020
    "Icon"="imageres.dll,76"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.MD2\command]
    @="cmd.exe /T:0b /K certutil -hashfile \"%1\" MD2 | findstr ^[0-9a-f]$"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.MD4\command]
    @="cmd.exe /T:0b /K certutil -hashfile \"%1\" MD4 | findstr ^[0-9a-f]$"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.MD5\command]
    @="cmd.exe /T:0b /K certutil -hashfile \"%1\" MD5 | findstr ^[0-9a-f]$"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA1\command]
    @="cmd.exe /T:0b /K certutil -hashfile \"%1\" SHA1 | findstr ^[0-9a-f]$"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA256\command]
    @="cmd.exe /T:0b /K certutil -hashfile \"%1\" SHA256 | findstr ^[0-9a-f]$"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA384\command]
    @="cmd.exe /T:0b /K certutil -hashfile \"%1\" SHA384 | findstr ^[0-9a-f]$"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA512\command]
    @="cmd.exe /T:0b /K certutil -hashfile \"%1\" SHA512 | findstr ^[0-9a-f]$"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.hash.about\command]
    @="cmd.exe /T:0b /K echo Контекстное меню для расчёта хэш-суммы файла. Не устанавливает программ, использует встроенные в Windows утилиты. && echo Аналог \"cmd.exe /T:0b /K certutil -hashfile <путь к файлу> <алгоритм> | findstr ^[0-9a-f]$\" && echo Поддерживаемые алгоритмы: MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512. && echo. && echo Версия: 1.02. Создано в internet-lab.ru."
  • Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\*\shell\internet-lab.ru]
    "Extended"=""
    "MUIVerb"="Хэш-сумма файла"
    "SubCommands"="internet-lab.ru.MD2;internet-lab.ru.MD4;internet-lab.ru.MD5;internet-lab.ru.SHA1;internet-lab.ru.SHA256;internet-lab.ru.SHA384;internet-lab.ru.SHA512;internet-lab.ru.hash.about"
    "Position"="Top"
    "Icon"="imageres.dll,275"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.MD2]
    @="MD2"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.MD4]
    @="MD4"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.MD5]
    @="MD5"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA1]
    @="SHA1"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA256]
    @="SHA256"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA384]
    @="SHA384"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA512]
    @="SHA512"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.hash.about]
    @="О меню"
    "CommandFlags"=dword:00000020
    "Icon"="imageres.dll,76"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.MD2\command]
    @="cmd.exe /U /T:0b /K certutil -hashfile \"%1\" MD2 | @chcp 1251 >nul & findstr /R /V \"^CertUtil: -hashfile\" & @chcp 866 >nul"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.MD4\command]
    @="cmd.exe /U /T:0b /K certutil -hashfile "%1\" MD4 | @chcp 1251 >nul & findstr /R /V \"^CertUtil: -hashfile\" & @chcp 866 >nul"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.MD5\command]
    @="cmd.exe /U /T:0b /K certutil -hashfile \"%1\" MD5 | @chcp 1251 >nul & findstr /R /V \"^CertUtil: -hashfile\" & @chcp 866 >nul"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA1\command]
    @="cmd.exe /U /T:0b /K certutil -hashfile \"%1\" SHA1 | @chcp 1251 >nul & findstr /R /V \"^CertUtil: -hashfile\" & @chcp 866 >nul"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA256\command]
    @="cmd.exe /U /T:0b /K certutil -hashfile \"%1\" SHA256 | @chcp 1251 >nul & findstr /R /V \"^CertUtil: -hashfile\" & @chcp 866 >nul"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA384\command]
    @="cmd.exe /U /T:0b /K certutil -hashfile \"%1\" SHA384 | @chcp 1251 >nul & findstr /R /V \"^CertUtil: -hashfile\" & @chcp 866 >nul"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA512\command]
    @="cmd.exe /U /T:0b /K certutil -hashfile \"%1\" SHA512 | @chcp 1251 >nul & findstr /R /V \"^CertUtil: -hashfile\" & @chcp 866 >nul"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.hash.about\command]
    @="cmd.exe /U /T:0b /K echo Контекстное меню для расчёта хэш-суммы файла. Не устанавливает программ, использует встроенные в Windows утилиты. && echo Поддерживаемые алгоритмы: MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512. && echo. && echo Версия: 2.02. Создано в internet-lab.ru."
  • Windows Registry Editor Version 5.00
    
    [-HKEY_CLASSES_ROOT\*\shell\internet-lab.ru]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.MD2]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.MD4]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.MD5]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA1]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA256]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA384]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\internet-lab.ru.SHA512]

Скачать REG для установки контекстного меню "internet-lab.ru hash":

internet-lab.ru hash install.reg

Скачать REG для установки контекстного меню "internet-lab.ru hash" (версия 2):

internet-lab.ru hash install v2.reg

Скачать REG для удаления контекстного меню "internet-lab.ru hash":

internet-lab.ru hash uninstall.reg

Теги

 

Похожие материалы

Удаление трояна Bitcoin Miner — nano.exe

Словил дома трояна, который устанавливает другие трояны. Через некоторое время комп залился кучей троянов, рекламных программ и левого софта. Помимо прочего мусора у меня поселился троян Bitcoin Miner. Заметить это чудо можно также по тому, что комп тормозит.

Запуск BAT скрипта при логине на сервер один раз

Настроим автозапуск BAT скрипта при логине юзера на сервер. Сделаем так, чтобы скрипт запускался только один раз, а при последующих входах запускаться не будет.

Теги

Zabbix шаблон для мониторинга RAID контроллеров LSI в Windows

Делюсь полезным шаблоном для мониторинга RAID контроллеров LSI (Broadcom, Avago). Мониторим с помощью утилиты storcli. Шаблон делал сам.