Thread: OSRS Protocol determine packet type

Results 1 to 6 of 6
  1. #1 OSRS Protocol determine packet type 
    Registered Member
    Join Date
    Sep 2012
    Posts
    119
    Thanks given
    76
    Thanks received
    11
    Rep Power
    36
    I'm currently converting an Apollo base to the current osrs deob build 129. I have the deob working and all and I have the packets needed, such as: rootinterface, openinterface, mapregion etc. I'm having trouble whether the packet is for example ShortLEA, byteS, or like ShortA. Is there any way to interpret the actual byte? Or do I have to compare it to another client seeing if they're similar?
    Reply With Quote  
     

  2. #2  
    Respected Member


    Join Date
    Jan 2009
    Posts
    5,743
    Thanks given
    1,162
    Thanks received
    3,603
    Rep Power
    5000
    Quote Originally Posted by Rondo View Post
    I'm currently converting an Apollo base to the current osrs deob build 129. I have the deob working and all and I have the packets needed, such as: rootinterface, openinterface, mapregion etc. I'm having trouble whether the packet is for example ShortLEA, byteS, or like ShortA. Is there any way to interpret the actual byte? Or do I have to compare it to another client seeing if they're similar?
    you'll need to find the packet in the client and go to the stream class methods to figure out which data type it is
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Sep 2012
    Posts
    119
    Thanks given
    76
    Thanks received
    11
    Rep Power
    36
    Quote Originally Posted by Stuart View Post
    you'll need to find the packet in the client and go to the stream class methods to figure out which data type it is
    Yes I know that, but how would you tell if one of the data type is saying shortA or shortLE. For example:

    Code:
     if(!client.aBool3060) {
             var3 = client.aClass70_Sub22_Sub1_3255.method1177(-322311386);
             var10 = client.aClass70_Sub22_Sub1_3255.method1177(-971130233);
             var2 = client.aClass70_Sub22_Sub1_3255.method1156(614027038);
             Class70_Sub16_Sub19.anIntArrayArray2480 = new int[var2][4];
    
             for(var4 = 0; var4 < var2; ++var4) {
                if(var1 != 0) {
                   throw new IllegalStateException();
                }
    
                for(var6 = 0; var6 < 4; ++var6) {
                   if(var1 != 0) {
                      throw new IllegalStateException();
                   }
    
                   Class70_Sub16_Sub19.anIntArrayArray2480[var4][var6] = client.aClass70_Sub22_Sub1_3255.method1195(722836851);
                }
             }
    This is a small sample of the update map region method in the 129 deob. The highlighted code shows what type of data it is.

    Code:
     public int method1177(int var1) {
          this.anInt1980 += 2112357014;
          return (this.aByteArray1983[this.anInt1980 * 339378275 - 2] & 255) + ((this.aByteArray1983[this.anInt1980 * 339378275 - 1] & 255) << 8);
       }
    This is the method for the particular data type. As I was saying, how would one know if this is saying this data type is saying to use shortA, shortLE, etc. I'm sorry if I did not explain this clear enough.
    Reply With Quote  
     

  4. #4  
    (Official) Thanksgiver

    Arham's Avatar
    Join Date
    Jan 2013
    Age
    23
    Posts
    3,415
    Thanks given
    7,254
    Thanks received
    1,938
    Rep Power
    3905
    Compare these to existing sources. Compare how they are written. the way they are written doesn't change because it's a networking standard, just how the packets are structured change.
    Attached image
    Attached image
    Quote Originally Posted by MrClassic View Post
    Arham is the official thanker!
    List of my work here!
    Reply With Quote  
     

  5. Thankful user:


  6. #5  
    Reverse Engineering

    freeezr's Avatar
    Join Date
    Dec 2011
    Posts
    1,067
    Thanks given
    288
    Thanks received
    444
    Rep Power
    401
    Quote Originally Posted by Rondo View Post
    Yes I know that, but how would you tell if one of the data type is saying shortA or shortLE. For example:

    Code:
     if(!client.aBool3060) {
             var3 = client.aClass70_Sub22_Sub1_3255.method1177(-322311386);
             var10 = client.aClass70_Sub22_Sub1_3255.method1177(-971130233);
             var2 = client.aClass70_Sub22_Sub1_3255.method1156(614027038);
             Class70_Sub16_Sub19.anIntArrayArray2480 = new int[var2][4];
    
             for(var4 = 0; var4 < var2; ++var4) {
                if(var1 != 0) {
                   throw new IllegalStateException();
                }
    
                for(var6 = 0; var6 < 4; ++var6) {
                   if(var1 != 0) {
                      throw new IllegalStateException();
                   }
    
                   Class70_Sub16_Sub19.anIntArrayArray2480[var4][var6] = client.aClass70_Sub22_Sub1_3255.method1195(722836851);
                }
             }
    This is a small sample of the update map region method in the 129 deob. The highlighted code shows what type of data it is.

    Code:
     public int method1177(int var1) {
          this.anInt1980 += 2112357014;
          return (this.aByteArray1983[this.anInt1980 * 339378275 - 2] & 255) + ((this.aByteArray1983[this.anInt1980 * 339378275 - 1] & 255) << 8);
       }
    This is the method for the particular data type. As I was saying, how would one know if this is saying this data type is saying to use shortA, shortLE, etc. I'm sorry if I did not explain this clear enough.
    that method is a Unsigned Little Endian Short (LEShort).

    if you look at the payload (aByteArray1983) and the position (anInt1980) you can tell what put/get operations are which.

    in the case of method1177, there are two bytes being get from the payload, so this is a type of short. the first byte in the operation (position - 2) is not being bitwise shifted while the second byte (position - 1) is being bitwise shifted. thus it is a leshort. "a" refers to the byte that is not being shifted being added eith the value 128.

    hope this is somewhat informative. currently writting this on my phone on my way to school lmao. if anything else you can add my skype @ im_frizzy if you have other questions.

    Attached image
    Reply With Quote  
     

  7. Thankful users:


  8. #6  
    Registered Member
    Join Date
    Sep 2012
    Posts
    119
    Thanks given
    76
    Thanks received
    11
    Rep Power
    36
    Quote Originally Posted by Leon_ View Post
    that method is a Unsigned Little Endian Short (LEShort).

    if you look at the payload (aByteArray1983) and the position (anInt1980) you can tell what put/get operations are which.

    in the case of method1177, there are two bytes being get from the payload, so this is a type of short. the first byte in the operation (position - 2) is not being bitwise shifted while the second byte (position - 1) is being bitwise shifted. thus it is a leshort. "a" refers to the byte that is not being shifted being added eith the value 128.

    hope this is somewhat informative. currently writting this on my phone on my way to school lmao. if anything else you can add my skype @ im_frizzy if you have other questions.
    Hey thanks for the advice I'll consider this with future revision as well.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 1
    Last Post: 11-05-2011, 10:57 PM
  2. Replies: 5
    Last Post: 10-23-2010, 01:00 PM
  3. Packet type 133 (Add Ignore)
    By Spooky in forum Help
    Replies: 4
    Last Post: 08-29-2010, 05:06 PM
  4. Strange Packet Type 2 o.O
    By CTucker in forum Help
    Replies: 3
    Last Post: 01-20-2010, 02:36 AM
  5. Stop using Multi-Classes for same packet types!
    By Impulser in forum Tutorials
    Replies: 5
    Last Post: 06-22-2008, 10:24 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •