This page includes various code snippets I thought would be useful to share.


The first one is a piece of code to get any of the KNOWNFOLDERID‘s in Windows.

The next piece of code is a snippet when you need to randomize a string with letters and numbers.

The last one is if you would like to execute shellcode. I.e when you have shellcode that you would like to run and you have converted it to a c-type char buffer. A good example of this when you want to wrap a meterpreter in your application.

The last snippet is code that can be used to convert a string in hex to the char values.