Register for your free account! | Forgot your password?

Go Back   elitepvpers › MMORPGs › Conquer Online 2 › CO2 Private Server
You last visited: Today at 16:26

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Classic [4267] client crashes after sending chat packet

Discussion on Classic [4267] client crashes after sending chat packet within the CO2 Private Server forum part of the Conquer Online 2 category.

Closed Thread
 
Old   #1
 
Mr_PoP's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 766
Received Thanks: 290
Classic [4267] client crashes after sending chat packet

#Request Close fixed
Mr_PoP is offline  
Old   #2
 
nTL3fTy's Avatar
 
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
Receive MsgConnect (1052):
Code:
uint encryptCode = (packet.AccountId + packet.Data) ^ 0x4321;
client.Crypto.ChangeCode(packet.Data ^ encryptCode);

// send MsgTalk (1004) with NEW_ROLE or ANSWER_OK string and ChatAttribute.Entrance (2101)
ChangeCode:
Code:
public unsafe void ChangeCode(uint data)
{
    _bufEncrypt3 = new byte[KEY_LENGTH];
    _bufEncrypt4 = new byte[KEY_LENGTH];
    uint data2 = data * data;
    fixed (byte* pKey1 = _bufEncrypt1, pKey2 = _bufEncrypt2, pKey3 = _bufEncrypt3, pKey4 = _bufEncrypt4)
    {
        MSVCRT.memcpy(pKey3, pKey1, KEY_LENGTH);
        MSVCRT.memcpy(pKey4, pKey2, KEY_LENGTH);

        for (int i = 0; i < KEY_LENGTH; i += 4)
        {
            *((uint*)&pKey3[i]) ^= data;
            *((uint*)&pKey4[i]) ^= data2;
        }
    }

    _useAlternate = true;
}
nTL3fTy is offline  
Old   #3
 
Mr_PoP's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 766
Received Thanks: 290
Quote:
Originally Posted by nTL3fTy View Post
Receive MsgConnect (1052):
Code:
uint encryptCode = (packet.AccountId + packet.Data) ^ 0x4321;
client.Crypto.ChangeCode(packet.Data ^ encryptCode);

// send MsgTalk (1004) with NEW_ROLE or ANSWER_OK string and ChatAttribute.Entrance (2101)
ChangeCode:
Code:
public unsafe void ChangeCode(uint data)
{
    _bufEncrypt3 = new byte[KEY_LENGTH];
    _bufEncrypt4 = new byte[KEY_LENGTH];
    uint data2 = data * data;
    fixed (byte* pKey1 = _bufEncrypt1, pKey2 = _bufEncrypt2, pKey3 = _bufEncrypt3, pKey4 = _bufEncrypt4)
    {
        MSVCRT.memcpy(pKey3, pKey1, KEY_LENGTH);
        MSVCRT.memcpy(pKey4, pKey2, KEY_LENGTH);

        for (int i = 0; i < KEY_LENGTH; i += 4)
        {
            *((uint*)&pKey3[i]) ^= data;
            *((uint*)&pKey4[i]) ^= data2;
        }
    }

    _useAlternate = true;
}
am doing the same thing!
Mr_PoP is offline  
Old   #4
 
nTL3fTy's Avatar
 
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
Quote:
Originally Posted by Mr_PoP View Post
am doing the same thing!
Sorry, I thought your UpdateKeys method was inaccurate but I thought through it too quickly.

Are the constants correct?
Code:
PacketType.Language = 1052
ChatType.LoginInformation = 2101
nTL3fTy is offline  
Old   #5
 
Mr_PoP's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 766
Received Thanks: 290
Quote:
Originally Posted by nTL3fTy View Post
Sorry, I thought your UpdateKeys method was inaccurate but I thought through it too quickly.

Are the constants correct?
Code:
PacketType.Language = 1052
ChatType.LoginInformation = 2101
Language = 0x41C,
LoginInformation = 0x835,

yeah!! am sure there is something wrong with the crypto tho!

EDIT: am going to do some Unit-Testes
Mr_PoP is offline  
Old   #6
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,314
Received Thanks: 4,209
Please don't remove the original question after you've received an answer.
#closed.
Spirited is offline  
Closed Thread


Similar Threads Similar Threads
c# sending packet
11/22/2011 - .NET Languages - 0 Replies
i enter an online flash game from my app webbrowser tho i cant find out how to send packets trougth it :S. i managed to send packets trought WPE PRO tho i want to code it into my proggy. i dont think i need to hook my own app am i?
Need help sending a packet !
02/28/2010 - Kal Online - 1 Replies
i've got a Question and i hope some1 can help me there is an item at a NPC that u can buy 1 only each time .. and i need to buy 1000000 of it so i need to send the packet to buy this item 1000000 times when i try to sniff the packet to buy this item i got : Packet type : 0x18 format : m arguments : (unknown character) so ... how can i send that (unknown character) as an argument ?? in the code that (unknown character) is displayed from "(DWORD)va_arg(args,DWORD)" when i tried to save...
sending packet at WPe
07/18/2008 - Dekaron - 10 Replies
after sending some packet at WPE my connection to 2moons always got disconnect the moment I send the packet can someone help me regargding this
packet sending
03/31/2008 - RF Online - 4 Replies
now i know how to bypass rf online and now i can run WPE PRO w/o getting detected by fireguard.any1 can help me w/ this packet sniffing?coz i get confused on what packet to capture and send to the server.thanks
sending a packet
11/26/2007 - Conquer Online 2 - 3 Replies
I've captured a packet that I'd like to re-send to do a specific function, but I don't know how to do that. I know it involves 4 encryption keys and a packet id number. My best guess is to send the packet to a proxy that hopefully will forward it to the server properly. Anyone want to offer some tips on what to use?



All times are GMT +1. The time now is 16:26.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.