Register for your free account! | Forgot your password?

Go Back   elitepvpers > Silkroad Online > SRO Coding Corner
You last visited: Today at 22:33

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


About SERVER_CHAT_INDEX (0xB025) packet

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2016
Posts: 30
Received Thanks: 12
About SERVER_CHAT_INDEX (0xB025) packet

I'm trying to bypass the "Cannot find [charname]" while sending a private message, and I've found that 0xB025 packet sent from the client somehow is the packet that allow the message to look like it is sent. However, when i push the packet to the client it shows all chat message, and sometimes it succeed..
Push code:
Packet packet = new Packet(0xB025);
packet.WriteUInt8(0x01);
packet.WriteUInt8(0x02); ---
problem in this two lines
packet.WriteUInt8(0x00); ---
Any hints would be really appreciated
Best,



"Abner" is offline  
Old 01/12/2017, 19:09   #2
 
elite*gold: 0
Join Date: Jan 2017
Posts: 4
Received Thanks: 0
RESPONSE

0xB025 - SERVER_AGENT_CHAT_RESPONSE

1 byte result
if(result == 2)
{
2 ushort errorCode
}
1 byte chatType
1 byte chatIndex


LasEm is offline  
Old 01/12/2017, 19:46   #3
 
elite*gold: 0
Join Date: Sep 2016
Posts: 30
Received Thanks: 12
This part i already get, that's what i'm working on, the chat index is somehow changed auto on every response, is there any way to enter the correct chatindex automatically every time...
best,
"Abner" is offline  
Old 01/12/2017, 20:44   #4
 
elite*gold: 0
Join Date: Jan 2009
Posts: 218
Received Thanks: 420
Quote:
Originally Posted by LasEm View Post
RESPONSE

0xB025 - SERVER_AGENT_CHAT_RESPONSE

1 byte result
if(result == 2)
{
2 ushort errorCode
}
1 byte chatType
1 byte chatIndex
Thank you for heartlessly copy-pasting this mess, but it looks better with

Anyways...
Quote:
is there any way to enter the correct chatindex automatically every time...
The chatIndex is always counting up for every CHAT_REQUEST the client sends (no matter what chatType and even if the target is not found).

Track the index yourself or copy it from the response. Also, don't hardcode the chatType.

Code:
if (packet.Opcode == 0xB025)
{
    byte result = packet.ReadByte();
    if (result == 2)
    {
        var errorCode = packet.ReadUShort();
        var chatType = packet.ReadByte();
        var chatIndex = packet.ReadByte();

        if (errorCode == 3) //UIIT_CHATERR_CANT_FIND_TARGET
        {
            var replace = new Packet(packet.Opcode, packet.Encrypted, packet.Massive);
            replace.WriteByte(1); //success
            replace.WriteByte(chatType);
            replace.WriteByte(chatIndex);

            ag_local_security.Send(replace);
            continue;
        }
    }
}


DaxterSoul is offline  
Thanks
7 Users
Old 01/12/2017, 22:16   #5
 
elite*gold: 0
Join Date: Sep 2016
Posts: 30
Received Thanks: 12
I believe this code/method will work if you have a packet filter on clientside, but any idea how to do it on server side, as its a s->c packet..
Ps: thanks for your reply


Sent from my CHM-U01 using Tapatalk
"Abner" is offline  
Old 01/12/2017, 23:36   #6


 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,095
Received Thanks: 2,630
Quote:
Originally Posted by "Abner" View Post
I believe this code/method will work if you have a packet filter on clientside, but any idea how to do it on server side, as its a s->c packet..
Ps: thanks for your reply


Sent from my CHM-U01 using Tapatalk
Here's an idea! Run the filter on server side.
​Exo is offline  
Old 01/13/2017, 09:16   #7
 
elite*gold: 0
Join Date: Sep 2016
Posts: 30
Received Thanks: 12
Oh, really sorry for being dump, wasn't having enough sleep...
Just did a typo on the packet, thanks for your help
"Abner" is offline  
Old 01/13/2017, 13:12   #8
 
elite*gold: 0
Join Date: Dec 2016
Posts: 72
Received Thanks: 37
Thanks daxter aswell here


Isoline is offline  
Reply

Tags
(to): message, 0xb025, c#, packets



« [C#] Clientless reconnect. | DonwloadServer Fake port »



All times are GMT +1. The time now is 22:33.


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.