Skip to content

Instantly share code, notes, and snippets.

@alibay7
Forked from trietptm/ioc-generator.ps1
Last active March 28, 2018 21:02
Show Gist options
  • Select an option

  • Save alibay7/302e348f5e85b593a3b2bbf50d33fe46 to your computer and use it in GitHub Desktop.

Select an option

Save alibay7/302e348f5e85b593a3b2bbf50d33fe46 to your computer and use it in GitHub Desktop.
PowerShell IOCs generator
dir . | Foreach-Object{
$file = $_
$hash = Get-FileHash $file -Algorithm MD5
$fileinfo = Get-Item $file
New-Object -TypeName PSObject -Property @{
VersionInfo = $fileinfo.VersionInfo
LastWriteTime = $fileinfo.LastWriteTime
Length = $fileinfo.Length
Algorithm = $hash.Algorithm
MD5 = $hash.Hash
Name = $fileinfo.Name
}
} | Format-List
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment