mirror of
https://github.com/qis/xorstr
synced 2026-06-08 16:52:38 +00:00
master
XorStr
A simple constexpr string literal obfuscator. The algorythm was taken from ADVobfuscator.
This technique does not hide strings from sophisticated static analysis tools and memory inspection.
Usage
Copy the file <include/xorstr.h> to your project and include it in the source code.
#include <xorstr.h>
#include <iostream>
int main() {
const std::string str = xorstr("xorstr_test_verify_error");
std::cout << str << std::endl;
}
You can verify that the string xorstr_test_verify_error does not exist in Release builds:
$ strings build/llvm/release/main | grep xorstr_test_verify_error
$ strings build/llvm/debug/main | grep xorstr_test_verify_error
xorstr_test_verify_error
$ strings build/msvc/Release/main.exe | grep xorstr_test_verify_error
$ strings build/msvc/Debug/main.exe | grep xorstr_test_verify_error
xorstr_test_verify_error
Description
Languages
C++
95.9%
CMake
4.1%