• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Windows Fake login with Socket

Cjaker

[0xDEADBEEF] EXCEPTION_ACCESS_VIOLATION
Joined
Oct 17, 2016
Messages
56
Solutions
1
Reaction score
137
Location
0xDEADBEEF
Hi guys, i am trying make a simple socket connection to retrieve the character list, and in this process i think my rsaEncrypt function have problem, can anyone help me with this?

I think the problem is in double variable, because he occupies 8 bytes and i don't found other solution for this.
All other things is working fine (position, encryptionPos...)

Code:
Code:
private BigInteger OTRsa = BigInteger.Parse("109120132967399429278860960508995541528237502902798129123468757937266291492576446330739696001110603907230888610072655818825358503429057592827629436413108566029093628212635953836686562675849720620786279431090218017681061521755056710823876476444260558147179707119674283982419152118103759076030616683978566631413");
public void rsaEncrypt()
{
    double m = 0;
    List<byte> rsaBytes = new List<byte>();
    for (int i = encryptionPos; i < position; i++)
    {
        rsaBytes.Add(message[i]);
    }

    rsaBytes.Reverse();

    for (int i = 0; i < rsaBytes.Count; i++)
    {
        m = m + (rsaBytes[i] * Math.Pow(256, i));
    }

    double pow = 65537;
    double c = Math.Pow(200, pow) % (double)OTRsa;

    Console.WriteLine(c);
    List<byte> newArray = new List<byte>();
    for (int i = 0; i < 1024; i += 8)
    {
        newArray.Add((byte)(((int)c >> i) & 255));
    }

    message.RemoveRange(encryptionPos, message.Count - encryptionPos);
    message.InsertRange(encryptionPos, newArray);
    encryptionPos = 0;
}
 
I am learning about socket and trying make a fake login to see how the connection works xD
The part of fake login is done, now i am trying to make communication in-game, but in XTEA_Encrypt still have problem.
 
Back
Top