Skip to content

Instantly share code, notes, and snippets.

@un4ckn0wl3z
Last active April 29, 2016 12:10
Show Gist options
  • Save un4ckn0wl3z/9a6260e940866ef743935b0c4313bb55 to your computer and use it in GitHub Desktop.
Save un4ckn0wl3z/9a6260e940866ef743935b0c4313bb55 to your computer and use it in GitHub Desktop.
function ExetoText
{
[CmdletBinding()] Param(
[Parameter(Position = 0, Mandatory = $True)]
[String]
$EXE,
[Parameter(Position = 1, Mandatory = $False)]
[String]
$Filename = "$pwd\ConvertedText.txt"
)
[byte[]] $hexdump = get-content -encoding byte -path "$EXE"
[System.IO.File]::WriteAllLines($Filename, ([string]$hexdump))
Write-Output "Converted file written to $Filename"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment