Last active
November 8, 2020 20:23
-
-
Save benpturner/de83882d6cef3019ad8cc1cdb6e722f0 to your computer and use it in GitHub Desktop.
Load & Execute C# Module in PS
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
# Load C# Module in PS | |
[System.Reflection.Assembly]::LoadFile("C:\Temp\StandIn.exe") | |
# Load C# Module in PS from Base64 Blob | |
$dllbytes = [System.Convert]::FromBase64String("fdsfdsfds") | |
[System.Reflection.Assembly]::Load($dllbytes) | |
# Execute C# Module in PS | |
$Mods=[System.AppDomain]::CurrentDomain.GetAssemblies() | |
foreach ($Mod in $Mods){if ($Mod.FullName -like "StandIn*") {$Mod.EntryPoint.Invoke($null,@(,[string[]]@(""))) }} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment