Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- -----------------------------------------
- * Game hacking QTS ( Quickie Tip Series )
- * no. 31 - Hiding your strings in your hack
- -----------------------------------------
- * Author: SEGnosis
- * Thanks to:
- * bitterbanana - No known site
- * Drunken Cheetah - No known site
- * fatboy88 - No known site
- * Geek4Ever - No known site
- * learn_more - www.uc-forum.com
- * Novocaine - http://ilsken.net/blog/?page_id=64
- * Philly0494 - No known site
- * Roverturbo - www.uc-forum.com
- * SilentKarma - www.halocoders.com - offline
- * Strife - www.uc-forum.com
- * Wieter20 - No known site
- */
- //----------------------------------//
- #ifndef _XOR_H
- #define _XOR_H
- template <int XORSTART, int BUFLEN, int XREFKILLER>
- class XorStr
- {
- private:
- XorStr();
- public:
- char s[ BUFLEN ];
- XorStr( const char * xs );
- ~XorStr()
- {
- for ( int i = 0; i < BUFLEN; i++ ) s[ i ]=0;
- }
- };
- template <int XORSTART, int BUFLEN, int XREFKILLER>
- XorStr<XORSTART,BUFLEN,XREFKILLER>::XorStr( const char * xs )
- {
- int xvalue = XORSTART;
- int i = 0;
- for ( ; i < ( BUFLEN - 1 ); i++ )
- {
- s[ i ] = xs[ i - XREFKILLER ] ^ xvalue;
- xvalue += 1;
- xvalue %= 256;
- }
- s[ BUFLEN - 1 ] = 0;
- }
- #endif
- // You can encode your string using the xor operator so that it is just a bit more difficult for anti-cheats to find your hack
- // Use an online xor generator such as - http://www.tutogames.xpg.com.br/xorgen.html - Or create your own
- // This xored string will run and decode your original string such as "aimbot-enable" at runtime and return a
- // string pointer for you to use
- char* szAimbotOption = /*aimbot-enable*/XorStr<0xFC,13,0x9DB4EDA6>("\x8E\x9C\x9A\x9E\x72\x2C\x67\x6D\x65\x67\x6A\x62"+0x9DB4EDA6).s;
- // If you are using C++ 11, you can use kingdeking's method of compile time encryption to for ease of use
- http://www.unknowncheats.me/forum/c-and-c/113715-compile-time-string-encryption.html#post960461
- //----------------------------------//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement