Code:
CNtlPacket packet(0x06);
unsigned char buf[] = { 0x03, 0x00, 0xac, 0x86, 0xf5, 0x74 };
packet.SetPacket(buf, 0x06);
packet.GetPacketHeader()->bEncrypt = true;
PushHandshakePacket(&packet);
This is what we use for it in AKCore.
And then in on Dispatch. We send the next result.
Code:
if header is 0x04
if (isHandshaken == false)
{
CNtlPacket packet2(0x22);
unsigned char buf2[] = { 0x10, 0x00, 0x84, 0xfb, 0x48, 0xf4, 0x8e, 0x5a, 0xb6, 0x67, 0xe2, 0x3d, 0x6e, 0x14, 0xb4, 0xa3, 0xc3, 0x24, 0x9e, 0x5f, 0xe3, 0xd1, 0xd5, 0x88, 0x10, 0x0d, 0x68, 0x4f, 0x3b, 0xa5, 0xed, 0x37, 0xed, 0x4a };
packet2.SetPacket(buf2, 0x22);
packet2.GetPacketHeader()->bEncrypt = false;
PushHandshakePacket(&packet2);
isHandshaken = true;
client = this;
}
Also dont' use 9001. Just use this client.
https://anonfile.com/X9dbN720n1/DBOTW_rar
Its sad to see people working on TW at all.
There is really no point, The alpha code is a better place to work on.
you wont ever get new content in it :(
- - - Updated - - -
Another way you can do this is.
Code:
uint8 rawData[] = { 0x06, 0x00, 0x03, 0x00, 0x30, 0x2C, 0x67, 0x4C };
Socket.Write((char*)rawData, sizeof(rawData));
and for processing packet 0x04
Code:
if (header->wOpCode == 4)
{
uint8 rawData2[] = { 0x22, 0x00, 0x10, 0x00, 0x49, 0xD1, 0xF1, 0x1C, 0x6D, 0x58, 0xF9, 0xC5, 0x30, 0x26, 0xA4, 0x7B,
0xB2, 0xD8, 0x2C, 0x86, 0x58, 0x60, 0x7B, 0xDD, 0xF0, 0x77, 0xCF, 0x25, 0x48, 0xB3, 0x65, 0x45,
0x38, 0x80, 0x14, 0x72 };
Write((char*)rawData2, sizeof(rawData2));