SolvedXorStr?

Posts 115 of 15 · Page 1 of 1
XorStr?
Sup guys, I added xor encyrption to my base, and it gives me a 2 letter string like: '8l' and so on.. And makes my hack crash.. any ideas?
Posting the exact error would help.
Quote Originally Posted by Flengo View Post
Posting the exact error would help.
I dont get any errors:s, the strings don't DeCrypt or something.. and if they do its like 2 letters, and not ones from my enctrypted text.
Quote Originally Posted by TrixtSam View Post
I dont get any errors:s, the strings don't DeCrypt or something.. and if they do its like 2 letters, and not ones from my enctrypted text.
Post your XorStr template and one method (example) where you are trying to decrypt a string.
I think your code is wrong, try to serch the correct one here.
Code:
#include "Includes.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;
}
Code:
#define STRING_VISUAL/*-[ Visual ]-*/XorStr<0x1D,13,0x5B99B88B>("\x30\x45\x3F\x76\x48\x51\x56\x45\x49\x06\x7A\x05"+0x5B99B88B).s
then i'd use this as a menu item..
Code:
pMenu->AddItem(STRING_VISUAL, &Variables.Visual);
Code:
#pragma once


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;
	} // clear string from stack
	operator char*( )
	{
		return s;
	}
	operator const char*( )
	{
		return s;
	}
};


template <int XORSTART, int BUFLEN, int XREFKILLER>
__declspec( noinline ) XorStr<XORSTART, BUFLEN, XREFKILLER>::XorStr( const char* xs )
{
	int xvalue = XORSTART;
	for( int i = 0; i < BUFLEN - 1; ++i )
	{
		s[i] = xs[i - XREFKILLER] ^ xvalue;
		xvalue += 1;
		xvalue %= 256;
	}
	s[BUFLEN - 1] = 0;
}
Code:
/*Test String*/XorStr<0x51,12,0x7695E86E>("\x05\x37\x20\x20\x75\x05\x23\x2A\x30\x34\x3C"+0x7695E86E).s
Try that
Quote Originally Posted by Flengo View Post
Code:
#pragma once


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;
	} // clear string from stack
	operator char*( )
	{
		return s;
	}
	operator const char*( )
	{
		return s;
	}
};


template <int XORSTART, int BUFLEN, int XREFKILLER>
__declspec( noinline ) XorStr<XORSTART, BUFLEN, XREFKILLER>::XorStr( const char* xs )
{
	int xvalue = XORSTART;
	for( int i = 0; i < BUFLEN - 1; ++i )
	{
		s[i] = xs[i - XREFKILLER] ^ xvalue;
		xvalue += 1;
		xvalue %= 256;
	}
	s[BUFLEN - 1] = 0;
}
Code:
/*Test String*/XorStr<0x51,12,0x7695E86E>("\x05\x37\x20\x20\x75\x05\x23\x2A\x30\x34\x3C"+0x7695E86E).s
Try that
Sorry for late reply.. but it doesnt show a string now:s
Quote Originally Posted by TrixtSam View Post
Sorry for late reply.. but it doesnt show a string now:s
Post the method function you are using to add an item to the menu.
Quote Originally Posted by Flengo View Post


Post the method function you are using to add an item to the menu.
Code:
pMenu->AddItem(/*"NX Chams"*/GROUP_ESP, &Variables.Chams, opt_OFFON, 2);
To add an item to the menu.

Code:
void D3DMenu::AddItem(char *txt, int *var, char **opt, int maxval, int typ)
{
  if (noitems>=(maxitems-3)) return;
  MENU[noitems]->typ=typ;
  MENU[noitems]->txt=txt;
  MENU[noitems]->opt=opt;
  MENU[noitems]->var=var;
  MENU[noitems]->maxval=maxval;
  noitems++;
  totheight=(noitems*height)+titleheight;
}
Thats the function.
If it helps.. It's fuck king 7 base.
XOR doesnt work with hans menu.
its got something to do with storing the text in an array i believe.
Quote Originally Posted by ac1d_buRn View Post
XOR doesnt work with hans menu.
its got something to do with storing the text in an array i believe.
Its Fuck King 7 Menu:s
Quote Originally Posted by TrixtSam View Post
Its Fuck King 7 Menu:s
Well who evers menu it is, XOR doesnt work with it. You need to use another form of encryption
Quote Originally Posted by ac1d_buRn View Post


Well who evers menu it is, XOR doesnt work with it. You need to use another form of encryption
Umk.. Thanks..
Quote Originally Posted by TrixtSam View Post
Umk.. Thanks..
He's right. There's a simple encryption method posted in this section. You should try it.

Good luck

/Solved
/Closed
Posts 115 of 15 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?