
strenc
strenc()
What is strenc()?
strenc() is a custom build tool which parses user defined strings inside of a .strenc file. strenc() will then output a header file with encrypted versions of the strings and #defines which call the decryption method on the also #defined encrypted strings.
What compilers does strenc() work with?
The supplied download is for Visual Studio 2008, but it should also work with any Windows compiler which supports custom build steps.
How can I use strenc()?
- Go to our Downloads Page and download the latest version of strenc().
- Extract the .rar file.
- Place strenc.exe in _C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin_
- Place strenc.lib in _C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib_
- Place strenc() Files.rules in _C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCProjectDefaults_
- Right-click on your project, click "Custom Build Rules..." then select "Find Existing." Select the strenc() Files.rules file and make sure it is check in the list.
- Add a .strenc file to your project with the below format:
STRING_ONE_DEFINE_NAME String one text STRING_TWO_DEFINE_NAME String two text
- Include {fileName}.h in any files where you wish to use the strings, where {fileName} is the name of the .strenc file you supplied.
What are some limitations with strenc()?
- Input to strenc() is parsed line by line. The first line strenc() see's will be the define name, the second line will be the actual text. For this reason, input files should always have a line-count multiple of 2.
- The #defines generated by strenc() are, for now, allocated dynamically and must be de-allocated by the user.
- The strings used in strenc() should remain short and sweet, due to static buffer sizes (this will be fixed)
What is some sample strenc() input and output?
INPUT: strings.strenc
INTRO_STRING
This is a test of strenc()
SECOND_STRING
How's it working?
THIRD_STRING
testing "quotes" bro.
OUTPUT: strings.h ```
ifndef STRINGS_KEY
#define STRINGS_KEY "1iCEVcHQRhf+rkybltGvodTAg6m9XMDp5WuFqxO2/jzZISUenNKL80BJP4w3as7Y"
#pragma comment(lib, "strenc")
void StrencDecode(char* buffer, char* Base64CharacterMap);
const char* GetDecryptedString(const char* encryptedString)
{
char* string = new char[1024];
strcpy(string, encryptedString);
StrencDecode(string, STRINGS_KEY);
return string;
}
#define INTRO_STRING GetDecryptedString("dHWjXKijXKiWRQtxXJl59Bg5XJtK6T4FfCq1")
#define SECOND_STRING GetDecryptedString("GHsJhJr5mAl5MBsKmBxU6La1")
#define THIRD_STRING GetDecryptedString("MHdLMHxU6K1uXAdeMHdLRuiuXOaU11==")
endif
```
Project Information
The project was created on Mar 14, 2012.
- License: GNU GPL v3
- 3 stars
- svn-based source control
Labels:
obfuscation
c