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

12/22/2017 12:06 moudixblack#1
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:rtfm: 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
12/23/2017 11:25 wshbr#2
#closed ([Only registered and activated users can see links. Click Here To Register...])