Advertisement
Guest User

Untitled

a guest
May 28th, 2014
1,030
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. -----------------------------------------
  3. * Game hacking QTS ( Quickie Tip Series )
  4. * no. 31 - Hiding your strings in your hack
  5. -----------------------------------------
  6. * Author: SEGnosis  
  7. * Thanks to:
  8. * bitterbanana      - No known site
  9. * Drunken Cheetah   - No known site
  10. * fatboy88      - No known site
  11. * Geek4Ever         - No known site
  12. * learn_more        - www.uc-forum.com
  13. * Novocaine         - http://ilsken.net/blog/?page_id=64
  14. * Philly0494        - No known site
  15. * Roverturbo        - www.uc-forum.com
  16. * SilentKarma       - www.halocoders.com - offline
  17. * Strife        - www.uc-forum.com
  18. * Wieter20      - No known site
  19. */
  20.  
  21.  
  22. //----------------------------------//
  23.  
  24. #ifndef _XOR_H
  25. #define _XOR_H
  26. template <int XORSTART, int BUFLEN, int XREFKILLER>
  27.  
  28. class XorStr
  29. {
  30. private:
  31.     XorStr();
  32. public:
  33.     char s[ BUFLEN ];
  34.  
  35.     XorStr( const char * xs );
  36.  
  37.     ~XorStr()
  38.     {
  39.         for ( int i = 0; i < BUFLEN; i++ ) s[ i ]=0;
  40.     }
  41. };
  42.  
  43. template <int XORSTART, int BUFLEN, int XREFKILLER>
  44. XorStr<XORSTART,BUFLEN,XREFKILLER>::XorStr( const char * xs )
  45. {
  46.     int xvalue = XORSTART;
  47.     int i = 0;
  48.  
  49.     for ( ; i < ( BUFLEN - 1 ); i++ )
  50.     {
  51.         s[ i ] = xs[ i - XREFKILLER ] ^ xvalue;
  52.         xvalue += 1;
  53.         xvalue %= 256;
  54.     }
  55.  
  56.     s[ BUFLEN - 1 ] = 0;
  57. }
  58. #endif
  59.  
  60. // 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
  61. // Use an online xor generator such as - http://www.tutogames.xpg.com.br/xorgen.html - Or create your own
  62.  
  63. // This xored string will run and decode your original string such as "aimbot-enable" at runtime and return a
  64. // string pointer for you to use
  65. char* szAimbotOption = /*aimbot-enable*/XorStr<0xFC,13,0x9DB4EDA6>("\x8E\x9C\x9A\x9E\x72\x2C\x67\x6D\x65\x67\x6A\x62"+0x9DB4EDA6).s;
  66.  
  67.  
  68. // If you are using C++ 11, you can use kingdeking's method of compile time encryption to for ease of use
  69. http://www.unknowncheats.me/forum/c-and-c/113715-compile-time-string-encryption.html#post960461
  70.  
  71. //----------------------------------//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement