mirror of
https://github.com/2006-Scape/Parabot-Randoms.git
synced 2026-07-03 00:38:07 +00:00
1b344c98e4
They block the login with `empty_mac` so I’m generating a new mac.
43 lines
1000 B
Java
43 lines
1000 B
Java
package org.parabot.randoms.dreamscape;
|
|
|
|
import org.parabot.core.Context;
|
|
import org.parabot.core.network.NetworkInterface;
|
|
import org.parabot.environment.randoms.RandomType;
|
|
import org.parabot.randoms.utils.Reflection;
|
|
|
|
/**
|
|
* @author EmmaStone
|
|
*/
|
|
public class MacAddressAvoider implements org.parabot.environment.randoms.Random {
|
|
|
|
private boolean done;
|
|
|
|
@Override
|
|
public boolean activate() {
|
|
return !done;
|
|
}
|
|
|
|
@Override
|
|
public void execute() {
|
|
byte[] mac = new byte[6];
|
|
new java.util.Random().nextBytes(mac);
|
|
Reflection.workAroundStaticValues(Context.getInstance().getClient().getClass(), "MAC_ADDRESS", NetworkInterface.formatMac(mac));
|
|
done = true;
|
|
}
|
|
|
|
@Override
|
|
public String getName() {
|
|
return "Mac address avoider";
|
|
}
|
|
|
|
@Override
|
|
public String getServer() {
|
|
return "dreamscape";
|
|
}
|
|
|
|
@Override
|
|
public RandomType getRandomType() {
|
|
return RandomType.ON_SERVER_START;
|
|
}
|
|
}
|