Blocking packets in a server

Results 1 to 15 of 15
  1. #1
    Enthusiast Godu is offline
    MemberRank
    May 2014 Join Date
    34Posts

    Blocking packets in a server

    Hey, I'm totally confused on how people fix those packet glitches in the source.

    Is it possible to prevent certain packets from being sent to the server? Or block them somehow?

    An example would be the map crash packet:
    Map Crash: A8 00 DF 00 00 00 00 00 00 00 01 0D 01 00 31
    And instructions say:
    To prevent crashing yourself, block recv A6 00.

    How do I block that recv for everyone in the server? And also, if its possible, get the source of the packet (who sent it).

    --Thanks


  2. #2
    Member buttocks is offline
    MemberRank
    Mar 2014 Join Date
    91Posts

    Re: Blocking packets in a server

    It's possible to 'block' it by simply checking if slea contains the packet but it's really iffy because while A8 00 DF 00 00 00 00 00 00 00 01 0D 01 00 31 will be blocked, i can simply send A8 00 DF 00 00 00 00 00 00 00 01 0D 01 00 32 and that will map crash.
    How to patch it? Simply find the handler that corresponds with the packet (in this case, PetChatHandler.java i believe) and try to find out what's wrong with the packet. In this case, it's a pet in a negative index if I'm not mistaken, simply add a check against it and that should fix things up.
    Last edited by buttocks; 01-08-14 at 07:24 PM.

  3. #3
    Enthusiast Godu is offline
    MemberRank
    May 2014 Join Date
    34Posts

    Re: Blocking packets in a server

    Thanks! I'll go ahead and try this. :)

  4. #4
    Omega sunnyboy is offline
    MemberRank
    Mar 2010 Join Date
    6,108Posts

    Re: Blocking packets in a server

    Quote Originally Posted by Godu View Post
    Hey, I'm totally confused on how people fix those packet glitches in the source.

    Is it possible to prevent certain packets from being sent to the server? Or block them somehow?

    An example would be the map crash packet:
    Map Crash: A8 00 DF 00 00 00 00 00 00 00 01 0D 01 00 31
    And instructions say:
    To prevent crashing yourself, block recv A6 00.

    How do I block that recv for everyone in the server? And also, if its possible, get the source of the packet (who sent it).

    --Thanks

    Is this v83?

  5. #5
    Enthusiast Godu is offline
    MemberRank
    May 2014 Join Date
    34Posts

    Re: Blocking packets in a server

    Quote Originally Posted by sunnyboy View Post
    Is this v83?
    Yea :O

  6. #6
    Omega sunnyboy is offline
    MemberRank
    Mar 2010 Join Date
    6,108Posts

    Re: Blocking packets in a server

    Quote Originally Posted by Godu View Post
    Yea :O
    Pet map crash

    Add a check before you execute the packet for talking to check for invalid actions

  7. #7
    Enthusiast Godu is offline
    MemberRank
    May 2014 Join Date
    34Posts

    Re: Blocking packets in a server

    Quote Originally Posted by sunnyboy View Post
    Pet map crash

    Add a check before you execute the packet for talking to check for invalid actions

    Thanks, can you show me what you mean? I'm not very sure what defines an invalid action during a packet interaction.. :(

  8. #8
    Enthusiast Godu is offline
    MemberRank
    May 2014 Join Date
    34Posts

    Re: Blocking packets in a server

    Bump, I figured out the patch for the pet d/c. Now I'm working on looking on how to patch the trade d/c. I don't know what it triggers...

    Like would I just check for 7B 00 04 B7 50 00 00 00 00 in the slea that was sent ?

  9. #9
    I'm overrated. Fraysa is offline
    MemberRank
    Apr 2008 Join Date
    4,891Posts

    Re: Blocking packets in a server

    If you post the handler and the packet that causes the crash, I can help you block it.

  10. #10
    Member buttocks is offline
    MemberRank
    Mar 2014 Join Date
    91Posts

    Re: Blocking packets in a server

    Quote Originally Posted by Godu View Post
    Bump, I figured out the patch for the pet d/c. Now I'm working on looking on how to patch the trade d/c. I don't know what it triggers...

    Like would I just check for 7B 00 04 B7 50 00 00 00 00 in the slea that was sent ?
    If I'm not mistaken, it sends the player an additional trade/shop window while they're already in trade. Simply check if a player is in trade already, and if he is disable the 04 mode.

  11. #11
    Enthusiast Godu is offline
    MemberRank
    May 2014 Join Date
    34Posts

    Re: Blocking packets in a server

    @Fraysa, well I was looking through playerInteractionHandler.java to see if I could find any clues as to what the trade d/c and I was thinking that at the of the code I could check if the packet was being sent like so:


    Code here

    Sry about linking to it but it doesn't format correctly in vbulletin..

    Quote Originally Posted by buttocks View Post
    If I'm not mistaken, it sends the player an additional trade/shop window while they're already in trade. Simply check if a player is in trade already, and if he is disable the 04 mode.
    @buttocks
    Hmm, would you recommend the way I did it in the link up there or should I also add a check for trade in the if statement to something like:

    PHP Code:
    if  ( player.getTrade() != null && slea.toString().contains("7B 00 04 B7 50 00 00 00 00")) { //... 
    Last edited by Godu; 06-08-14 at 12:36 AM.

  12. #12
    Omega sunnyboy is offline
    MemberRank
    Mar 2010 Join Date
    6,108Posts

    Re: Blocking packets in a server

    Quote Originally Posted by Godu View Post
    @Fraysa, well I was looking through playerInteractionHandler.java to see if I could find any clues as to what the trade d/c and I was thinking that at the of the code I could check if the packet was being sent like so:


    Code here

    Sry about linking to it but it doesn't format correctly in vbulletin..


    @buttocks
    Hmm, would you recommend the way I did it in the link up there or should I also add a check for trade in the if statement to something like:

    PHP Code:
    if  ( player.getTrade() != null && slea.toString().contains("7B 00 04 B7 50 00 00 00 00")) { //... 
    Post your VISIT handler part of the PlayerInteractionHandler.java file

  13. #13
    Enthusiast Godu is offline
    MemberRank
    May 2014 Join Date
    34Posts

    Re: Blocking packets in a server

    @sunnyboy

    else if (mode == Action.VISIT.getCode()) {
    if (c.getPlayer().getTrade() != null && c.getPlayer().getTrade().getPartner() != null) {
    MapleTrade.visitTrade(c.getPlayer(), c.getPlayer().getTrade().getPartner().getChr());
    }

    Also if anyone else is looking at this, do you know the other v83 map crash packets? I know there's a polearm one, and a pet talk d/c one. Both of which are fixed (test and didn't d/c), but someone came in the other day and d/c'ed the map so apparently there are more. So any help would be appreciated!

  14. #14
    Omega sunnyboy is offline
    MemberRank
    Mar 2010 Join Date
    6,108Posts

    Re: Blocking packets in a server

    There are like 20ish around v83 map crashes

  15. #15
    Enthusiast Godu is offline
    MemberRank
    May 2014 Join Date
    34Posts

    Re: Blocking packets in a server

    Quote Originally Posted by sunnyboy View Post
    There are like 20ish around v83 map crashes
    Wow. That sux lol. Know any of the most common ones? Also did you figure anything out with the VISIT handler?
    @buttocks can you explain how I should disable the option of creating a shop (04) ?

    thanks
    Last edited by Godu; 06-08-14 at 07:19 AM.



Advertisement