~ruther/NosSmooth

a29b2cd3101c52e5371fd6f247ba2f9a65715bbd — Rutherther 2 years ago 6fa0c5b
fix(crypto): add support for c_close, f_stash_end in deserialization of unknown packets
1 files changed, 7 insertions(+), 3 deletions(-)

M Core/NosSmooth.Cryptography/CryptographyManager.cs
M Core/NosSmooth.Cryptography/CryptographyManager.cs => Core/NosSmooth.Cryptography/CryptographyManager.cs +7 -3
@@ 78,7 78,7 @@ public class CryptographyManager
        var firstCharDecrypted = ClientLogin.Decrypt(data.Slice(0, 1), encoding);

        if (firstCharDecrypted.StartsWith("f") ||
                firstCharDecrypted.StartsWith("N"))
            firstCharDecrypted.StartsWith("N"))
        {
            var beginning = data.Slice(0, 6);
            var beginningLoginDecrypted = ClientLogin.Decrypt(beginning, encoding);


@@ 108,12 108,16 @@ public class CryptographyManager
    {
        var firstCharDecrypted = ClientLogin.Decrypt(data.Slice(0, 1), encoding);

        if (firstCharDecrypted.StartsWith("N"))
        if (firstCharDecrypted.StartsWith("N") ||
            firstCharDecrypted.StartsWith("f") ||
            firstCharDecrypted.StartsWith("c"))
        {
            var beginning = data.Slice(0, 4);
            var beginningLoginDecrypted = ClientLogin.Decrypt(beginning, encoding);

            if (beginningLoginDecrypted.StartsWith("NoS "))
            if (beginningLoginDecrypted.StartsWith("NoS0") ||
                beginningLoginDecrypted.StartsWith("f_st") ||
                beginningLoginDecrypted.StartsWith("c_cl"))
            {
                return ServerLogin.Decrypt(data, encoding);
            }

Do not follow this link