1
0
mirror of https://github.com/qis/xorstr synced 2026-06-08 16:52:38 +00:00
2017-10-15 19:41:16 +02:00
2017-10-15 19:38:40 +02:00
2017-10-15 19:38:40 +02:00
2017-10-15 19:41:16 +02:00
2017-10-15 19:38:40 +02:00

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
S
Description
Automated archival mirror of github.com/qis/xorstr
Readme BSD-3-Clause 28 KiB
Languages
C++ 95.9%
CMake 4.1%