Skip to content

Instantly share code, notes, and snippets.

@msuiche
Created January 13, 2017 05:35
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save msuiche/110716bbaa404877c12b25b750c2d58e to your computer and use it in GitHub Desktop.
Save msuiche/110716bbaa404877c12b25b750c2d58e 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