Created
June 16, 2014 21:31
-
-
Save mattifestation/9975f46887ddcbbb13ae to your computer and use it in GitHub Desktop.
Module Initializer PoC - Run build.bat from current dir in Visual Studio Command Prompt
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
csc test.cs | |
ildasm /OUT=test.il test.exe | |
type moduleinititalizer.il >> test.il | |
ilasm /EXE /OUTPUT=test.exe test.il |
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
.method private hidebysig specialname rtspecialname static | |
void .cctor() cil managed | |
{ | |
.maxstack 8 | |
IL_0000: nop | |
IL_0001: ldstr "Hello" | |
IL_0006: call void [mscorlib]System.Console::Write(string) | |
IL_000b: nop | |
IL_000c: ret | |
} |
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
using System; | |
namespace testns | |
{ | |
class test | |
{ | |
public static void Main(String[] args) | |
{ | |
Console.WriteLine(", World!"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment