[Hosting CLR] Betcha can't reflector this!
In the archive is a source code for a very basic program that is capable of hosting CLR inside of an unmanaged process.
Over the time I got bored by these 'haxxors' opening my apps in reflector and finding their way to cheat/abuse them. And so I wrote this, with a little update the input assemblies can be encrypted/compressed, all you need to do is make sure that the LoadCodeFromFile() function returns a valid .NET executable, or bypass it completely by fetching the assembly from somewhere else, the only limit is your imagination.
Please note that the error checking, or lack thereof, suggests not using this code in production.
The code has been briefly commented, but I believe that it's self explanatory enough.
Usage:
Have fun!
Questions/Suggestions highly appreciated.
In the archive is a source code for a very basic program that is capable of hosting CLR inside of an unmanaged process.
Over the time I got bored by these 'haxxors' opening my apps in reflector and finding their way to cheat/abuse them. And so I wrote this, with a little update the input assemblies can be encrypted/compressed, all you need to do is make sure that the LoadCodeFromFile() function returns a valid .NET executable, or bypass it completely by fetching the assembly from somewhere else, the only limit is your imagination.
Please note that the error checking, or lack thereof, suggests not using this code in production.
The code has been briefly commented, but I believe that it's self explanatory enough.
Usage:
Code:
CLRSTARTUPINFO * info = malloc(sizeof(CLRSTARTUPINFO));
LoadCodeFromFile("somefile", info);
CreateThread(NULL, 0, CLRThreadProc, info, 0, NULL); // clr thread proc will *not* cleanup info when its done
Questions/Suggestions highly appreciated.