Last active
August 29, 2015 14:14
-
-
Save sixdub/fc8ad412d845ca2b340b to your computer and use it in GitHub Desktop.
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
function Invoke-DllByteEncode | |
{ | |
#Encoder used to take a dll and turn it into a base64 encoded byte array for Powersploit's | |
#Invoke-ReflectivePEInjection | |
Param( | |
[Parameter(Position = 0)] | |
[String] | |
$InputPath, | |
[Parameter(Position = 1)] | |
[String] | |
$OutputPath=$InputPath+".bin" | |
) | |
$Content = Get-Content -Path $InputPath -Encoding Byte | |
$Base64 = [System.Convert]::ToBase64String($Content) | |
$Base64 | Out-File $OutputPath | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment