How to disable RSA - Shadowrs/osrs-refactor-revision-1 GitHub Wiki

Identify and disable RSA

Search for "bigint" in the client

Identify code which follows this structure:

public void doRSA(final BigInteger var1, final BigInteger var2) {
    final int var3 = pos;
    pos = 0;
    final byte[] var4 = new byte[var3];
    readBytes(var4, 0, var3);
    final BigInteger var5 = new BigInteger(var4);
    final BigInteger var6 = var5.modPow(var1, var2);
    final byte[] var7 = var6.toByteArray();
    pos = 0;
    writeShort(var7.length);
    appendBytes(var7, 0, var7.length);
}

The line that matters:

final BigInteger var6 = var5.modPow(var1, var2);

To disable RSA, assign var6 equal to var5, instead of var5 modulus.

final BigInteger var6 = var5; // .modPow(var1, var2); // do not apply the modulus