Hey Cooldown folks
I'm actually a bit miserable about this point. trying to bypass the client's algorithms to access the packet without encryption.
I actually read the login packet. But things failed when tried to read the movement packet. 1010
Tried reading and sniffing somethings like Blowfish but @Spirited disclosed that I don't have to worry about the BF thing
due lack of @Spirited time I couldn't talk with him that enough, he asked me gently to ask you some of help
This is Send hook Ws2_32.dll
Packet 1010 is printed in console, but the packets somehow still encrypted
The current code just decrypting the login packet , some junks are removed from the hook
I need some help with this and some guidance.
int __stdcall csv3_send(SOCKET s, PBYTE buf, int len, int flags)
{
if ( len == 276) // lenth of packet 1086 Login
{
CLegacyCipher* legacy;
legacy = new CLegacyCipher();
if ( len == 24 || len == 276 || len == 32)
{
legacy->GenerateIV(0x13FA0F9D, 0x6D5C7962);
if (legacy)
{
//_COCAC->Decrypt(buf ,len);
if (len != 276 )
{
legacy->Decrypt(buf, len-8);
}
else
{
legacy->Decrypt(buf, len);
}
//legacy->ResetCounters();
int lenx = *buf;
if (/*lenx == 276 || len == 276 || *//*getPacketHeader(buf) == 0x0114 */ /*len == 0x114 || *//*( len >= 30 && len <= 40)*/ 1)
{
//logFile<<"Packet ID :" << dec <<getPacketHeader(buf) << " || Hex : " << std::hex << getPacketHeader(buf) << std::endl;
// logFile<<"Packet Legnth :" << std::dec << len << std::endl;
std::cout<< "[TQCIPHER] Len: " << len << "] Packet : ";
for ( int x=0; x< len; x++)
{
//std::cout<< " 0x"<<static_cast<int>(buf[x]) <<std::hex;
std::cout << std::setw(2) << std::setfill('0') << std::hex << static_cast<int>(buf[x]) << " ";
}
std::cout<< "\n";
}
if (len != 276 )
{
legacy->Encrypt(buf, len-8);
}
else
{
legacy->Encrypt(buf, len);
}
//legacy->Encrypt(buf, len);
}
}
legacy->ResetCounters();
delete legacy;
legacy = NULL;
}
typedef int(__stdcall *LPFSEND)(SOCKET, PBYTE, int, int);
return ((LPFSEND)send_stub.Address)(s, buf, len, flags);
}