This may be a little technical, but for those interested & who know how to make good use of it, here is the algorithm to decrypt etpro's secret servercommands.
They always start with '*'
So basically its just base64 with a rather limited and custom alphabet. The first char of the decoded message is a command number, which determines a particular kind of action (see, for instance, 0x30014C20). There are 14 commands, and they appear to do a wide range of things varying from printing mundane messages "Constructing...." to setting up and or requesting security information.Code:void etpro_decrypt(char *msg) { char table[] = "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x3E\x00\x3F\x00\x00" "\x34\x35\x36\x37\x38\x39\x3A\x3B" "\x3C\x3D\x00\x00\x00\x00\x00\x00" "\x00\x00\x01\x02\x03\x04\x05\x06" "\x07\x08\x09\x0A\x0B\x0C\x0D\x0E" "\x0F\x10\x11\x12\x13\x14\x15\x16" "\x17\x18\x19\x00\x00\x00\x00\x00" "\x00\x1A\x1B\x1C\x1D\x1E\x1F\x20" "\x21\x22\x23\x24\x25\x26\x27\x28" "\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30" "\x31\x32\x33\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00"; char decoded[1024]; char encoded[1024]; strncpy_s(encoded, sizeof(encoded), msg+1, 1024); int j,i = 0; int decIdx = 0; int msgLen = strlen(encoded); char c, b1,b2,b3; char tc, t1,t2,t3; int p,q; while (i<msgLen){ c = *(encoded+i); b1 = b2 = b3 = 0x41; if (i+1 < msgLen) b1 = *(encoded+i+1); if (i+2 < msgLen) b2 = *(encoded+i+2); if (i+3 < msgLen) b3 = *(encoded+i+3); tc = table[c] << 2; t1 = table[b1]; t2 = table[b2]; t3 = table[b3]; p = (int)t1 >> 4; p |= (int)tc; decoded[decIdx] = (char)p; if (i+2 < msgLen){ p = 0xf & (int)t1; p = p << 4; q = (int)t2; q = q >> 2; p |= q; decoded[decIdx+1] = (char)p; decIdx+=2; } else { decIdx++; } if (i+3 < msgLen){ p = 3 & (int)t2; p = p << 6; p |= t3; decoded[decIdx] = (char)p; decIdx++; } i+=4; } char commandByte = decoded[0]; }
Have fun!


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks