[C# - Silkroad Packet] - Do not understand Chernobyl.

07/08/2015 13:11 ​Goofie​#1
As the title say. Chernobyl is weird when he is coding, was checking his way of making bot detection and it makes no sense to me.

So his "locale" is this:
Code:
byte locale = pck.ReadUInt8();
Session isBot is false from start.
Code:
m_State.SetParameter("isBot", false);
This is the part I don't understand: (Agent)
Code:
if (Global.EnableBotDetected && locale == Global.OriginalLocale)
{
    m_State.SetParameter("isBot", true);
}
if (locale != Global.OriginalLocale)
{
    Packet p = new Packet(0x6103);
    p.WriteUInt32(uint32_1);
    p.WriteAscii(uname);
    p.WriteAscii(passw);
    p.WriteUInt8(Global.OriginalLocale);
    p.WriteUInt32(ukn1);
    p.WriteUInt16(ukn);
    // m_ModuleSecurity.Send(p);
    SendPacketToModule(p);
    continue;
}
Gateway:
Code:
if (locale > 0 && locale != Global.OriginalLocale)
{
    Packet login = new Packet(0x6102);
    login.WriteUInt8(Global.OriginalLocale);
    login.WriteAscii(username);
    login.WriteAscii(password);
    login.WriteUInt16(ServerID);
    // m_ModuleSecurity.Send(login);
    SendPacketToModule(login);
    continue;
}
His OriginalLocale is
Code:
public static int OriginalLocale = 22;
Why would you resend the original locale like this and the biggest question, does this even detect bots? lol?
07/09/2015 15:16 Timlock#2
because, mbot and sbot always send locale 22..

If you edit your client to send 0 locale, and have the filter just correct it before gateway receives it, your fine.

Atleast i think the bots always send 22, never double checked.
04/17/2017 08:14 neksrock#3
Timlock, how set my client to send 0 locale? need edit silkroad.exe or sro_client.exe?
04/22/2017 16:28 Isoline*#4
it is based on the assumption that sbot and mbot will always send 0x22 locale prefix, so he is differing the originals ones (sent from bots) from the tampered onces (sent by your custom sr_client).
the real problem is that if you change you clients locale, players wont be able to start their bot in the first place.
so kinda stupid way of doing it.