1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# Función simple para almacenar un hash de un programa function hashear($ruta){ Get-FileHash $ruta } (hashear 'C:\Windows\System32\notepad.exe' | select hash).hash | Out-File hash.txt (gc hash.txt) Get-Process | select Path | %{ hashear $_.Path } Get-Process | select Path | %{ (hashear $_.Path).hash } Get-Process | select Path | %{ if ((hashear $_.Path).hash -match (gc hash.txt)) { "Igual",$_.path } } |