Register for your free account! | Forgot your password?

Go Back   elitepvpers > Conquer Online 2 > CO2 PServer - Discussions / Questions
You last visited: Today at 22:40

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

 

How To find/figure out the String Offsets in Protocol Packet after Converting?

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2016
Posts: 19
Received Thanks: 1
Exclamation How To find/figure out the String Offsets in Protocol Packet after Converting?

after the 3D Edition or 3.0 of Co version whatever

there are many packets have been proto now such as
2500
10014
10010
10017

i can get the uint offets and its okay with meh

but like packet 2500 its gonna be a shit of 00(zeros)00 bec after converting or shifting whatever with these
PHP Code:
  public static uint[] Read7BitEncodedInt(byte[] buffer)
        {
            List<
uintptr2 = new List<uint>();

            for (
int i 0buffer.Length; )
            {
                if (
<= buffer.Length)
                {
                    
int tmp buffer[i++];

                    if (
tmp == 0)
                        while (
true)
                        {
                            if (
buffer.Length) break;
                            
tmp buffer[i++];
                            if (
tmp 128)
                            {
                                
ptr2.Add((uint)tmp);
                                break;
                            }
                            else
                            {
                                
int result tmp 0x7f;
                                if ((
tmp buffer[i++]) < 128)
                                {
                                    
result |= tmp << 7;
                                    
ptr2.Add((uint)result);
                                    break;
                                }
                                else
                                {
                                    
result |= (tmp 0x7f) << 7;
                                    if ((
tmp buffer[i++]) < 128)
                                    {
                                        
result |= tmp << 14;
                                        
ptr2.Add((uint)result);
                                        break;
                                    }
                                    else
                                    {
                                        
result |= (tmp 0x7f) << 14;
                                        if ((
tmp buffer[i++]) < 128)
                                        {
                                            
result |= tmp << 21;
                                            
ptr2.Add((uint)result);
                                            break;
                                        }
                                        else
                                        {
                                            
result |= (tmp 0x7f) << 21;
                                            
result |= (tmp buffer[i++]) << 28;
                                            
ptr2.Add((uint)result);
                                            break;
                                        }
                                    }
                                }
                            }
                        }
                }
                else break;
            }
            return 
ptr2.ToArray(); 
i just need a hint or a link can explain that part coz with my searching for it im always finding for the files not for the packets/sniffers i mean

i hope anyone can help me with that xD



moudixblack is offline  
Old   #2
Im Ruhestand






 
elite*gold: 0
The Black Market: 402/0/0
Join Date: Aug 2014
Posts: 30,114
Received Thanks: 2,960
#closed (duplicated post)


wshbr is offline  
Thanks
1 User
Closed Thread

Tags
packets proto



« Previous Thread | Next Thread »

Similar Threads
Converting a string to an uint
The authresponse packet sends 2 values that can be practically anything and the 1052 packet uses those values for decryption reasons (5017). Now I...
6 Replies - CO2 PServer - Discussions / Questions
[Guide/Rant] Figure out packet subtypes YOURSELF
Ok so title is rather fucked but I couldn't think of a better way to describe the thread... I'm focusing a bit on CoEmu but it will work on any...
21 Replies - CO2 PServer Guides & Releases



All times are GMT +2. The time now is 22:40.


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

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.