runeliteplus: refined private server support
This commit is contained in:
@@ -29,16 +29,18 @@ import net.runelite.api.mixins.Copy;
|
||||
import net.runelite.api.mixins.Inject;
|
||||
import net.runelite.api.mixins.Mixin;
|
||||
import net.runelite.api.mixins.Replace;
|
||||
import net.runelite.api.mixins.Shadow;
|
||||
import net.runelite.rs.api.RSBuffer;
|
||||
import net.runelite.rs.api.RSClient;
|
||||
|
||||
@Mixin(RSBuffer.class)
|
||||
public abstract class RSBufferMixin implements RSBuffer
|
||||
{
|
||||
@Inject
|
||||
private static BigInteger exponent = new BigInteger("10001", 16);
|
||||
@Shadow("client")
|
||||
private static RSClient client;
|
||||
|
||||
@Inject
|
||||
private static BigInteger modulus = new BigInteger("83ff79a3e258b99ead1a70e1049883e78e513c4cdec538d8da9483879a9f81689c0c7d146d7b82b52d05cf26132b1cda5930eeef894e4ccf3d41eebc3aabe54598c4ca48eb5a31d736bfeea17875a35558b9e3fcd4aebe2a9cc970312a477771b36e173dc2ece6001ab895c553e2770de40073ea278026f36961c94428d8d7db", 16);
|
||||
private static BigInteger exponent = new BigInteger("10001", 16);
|
||||
|
||||
@Copy("encryptRsa")
|
||||
public void rs$encryptRsa(BigInteger var1, BigInteger var2)
|
||||
@@ -48,6 +50,6 @@ public abstract class RSBufferMixin implements RSBuffer
|
||||
@Replace("encryptRsa")
|
||||
public void rl$encryptRsa(BigInteger var1, BigInteger var2)
|
||||
{
|
||||
rs$encryptRsa(exponent, modulus);
|
||||
rs$encryptRsa(exponent, client.getModulus());
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
package net.runelite.mixins;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import net.runelite.api.ChatMessageType;
|
||||
@@ -1686,4 +1687,22 @@ public abstract class RSClientMixin implements RSClient
|
||||
RSFriendSystem friendSystem = getFriendManager();
|
||||
friendSystem.removeFriend(friend);
|
||||
}
|
||||
|
||||
@Inject
|
||||
BigInteger modulus = new BigInteger("83ff79a3e258b99ead1a70e1049883e78e513c4cdec538d8da9483879a9f81689c0c7d146d7b82b52d05cf26132b1cda5930eeef894e4ccf3d41eebc3aabe54598c4ca48eb5a31d736bfeea17875a35558b9e3fcd4aebe2a9cc970312a477771b36e173dc2ece6001ab895c553e2770de40073ea278026f36961c94428d8d7db", 16);
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public BigInteger getModulus()
|
||||
{
|
||||
return modulus;
|
||||
}
|
||||
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public void setModulus(BigInteger modulus)
|
||||
{
|
||||
this.modulus = modulus;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user