This project provides a special macro OBFSTR, which wraps the original string inside a lambda function that utilizes template and constexpr functions, enabling compile-time obfuscation.
We have the following program. In this case, the 'Hello world!' string can be easily found, and a reverse engineer can understand the program logic.
#include <iostream>
#include <obfstr.h>
int main()
{
printf("%s", "Hello world!");
return 0;
}But if you wrap your string with a macro, it will be processed at compile-time and stored in memory in an encoded format. As a result, reverse engineers will have some problems understanding the program logic statically.
#include <iostream>
#include <obfstr.h>
int main()
{
printf("%s", OBFSTR("Hello world!"));
return 0;
}Compile-time encode, runtime decode.

