Last active
April 13, 2024 14:48
-
-
Save FelipeGrijo/3d8c64ed3e26912f3d35d2fdb35c80e0 to your computer and use it in GitHub Desktop.
Ver/Comparar hash SHA1, SHA256, SHA384, SHA512, MACTripleDES, MD5, RIPEMD160 PowerShell Win10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://gist.github.com/FelipeGrijo | |
function MenuH | |
{ | |
param ( | |
[string]$Title = 'Verificar Hash de Arquivos' | |
) | |
Write-Host "$Title" | |
Write-Host "1: Ver" | |
Write-Host "2: Comparar" | |
Write-Host "3: Sair" | |
} | |
do | |
{ | |
MenuH | |
$input = Read-Host "Opção" | |
switch ($input) | |
{ | |
'1' { | |
$LocalArq = Read-Host -Prompt 'Diretório do Arquivo' | |
$TipoHash = Read-Host -Prompt 'Escolha o Tipo de Hash (SHA1, SHA256, SHA384, SHA512, MACTripleDES, MD5, RIPEMD160)' | |
Get-FileHash $LocalArq -Algorithm $TipoHash | |
} '2' { | |
$PHash1 = Read-Host -Prompt 'Hash 1:' | |
$SHash2 = Read-Host -Prompt 'Hash 2:' | |
"$PHash1".equals("$SHash2",1) | |
} '3' { | |
return | |
} | |
} | |
pause | |
} | |
until ($input -eq '3') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment