Page 1 of 1

Posted: Fri Apr 25, 2014 8:43 pm
by Bo
how the hell should i guess that answer was in ASCII?
correct answer is 72616e646f6d2073656564 in hex and i ve got it in like 5 min, but lost an hour to figure out the answer format. c++ there

Code: Select all

printf("%c%c%c%c%c%c%c%c%c%c%c%c",
		(0x3d ^ 0x4F),
		(0x2e ^ 0x4F),
		(0x21 ^ 0x4F),
		(0x2b ^ 0x4F),
		(0x20 ^ 0x4F),
		(0x22 ^ 0x4F),
		(0x6f ^ 0x4F),
		(0x3c ^ 0x4F),
		(0x2a ^ 0x4F),
		(0x2a ^ 0x4F),
		(0x2b ^ 0x4F));

Posted: Fri Apr 25, 2014 9:18 pm
by Bo

Code: Select all

for(int i = 0; i< s.size();i+=2)
	{
		stringstream str;
		string byte = s.substr(i,2);
		str << byte;
		int num(0);
		str >> std::hex >> num;
		printf("%c",(num^KEY));
	}
	cout<<endl;