mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 08:56:04 +01:00
Merge branch 'development' into dev-world-scripts
This commit is contained in:
@@ -136,8 +136,9 @@ public class ConfigContainer {
|
||||
public int bindPort = 22102;
|
||||
/* This is the port used in the default region. */
|
||||
public int accessPort = 0;
|
||||
|
||||
public boolean enableScriptInBigWorld = false;
|
||||
|
||||
public boolean enableConsole = true;
|
||||
public GameOptions gameOptions = new GameOptions();
|
||||
public JoinOptions joinOptions = new JoinOptions();
|
||||
public ConsoleAccount serverAccount = new ConsoleAccount();
|
||||
|
||||
@@ -20,11 +20,11 @@ public final class Crypto {
|
||||
public static byte[] ENCRYPT_SEED_BUFFER = new byte[0];
|
||||
|
||||
public static void loadKeys() {
|
||||
DISPATCH_KEY = FileUtils.read(KEYS_FOLDER + "/dispatchKey.bin");
|
||||
DISPATCH_SEED = FileUtils.read(KEYS_FOLDER + "/dispatchSeed.bin");
|
||||
DISPATCH_KEY = FileUtils.read(KEY("dispatchKey.bin"));
|
||||
DISPATCH_SEED = FileUtils.read(KEY("dispatchSeed.bin"));
|
||||
|
||||
ENCRYPT_KEY = FileUtils.read(KEYS_FOLDER + "/secretKey.bin");
|
||||
ENCRYPT_SEED_BUFFER = FileUtils.read(KEYS_FOLDER + "/secretKeyBuffer.bin");
|
||||
ENCRYPT_KEY = FileUtils.read(KEY("secretKey.bin"));
|
||||
ENCRYPT_SEED_BUFFER = FileUtils.read(KEY("secretKeyBuffer.bin"));
|
||||
}
|
||||
|
||||
public static void xor(byte[] packet, byte[] key) {
|
||||
@@ -40,7 +40,7 @@ public final class Crypto {
|
||||
public static void extractSecretKeyBuffer(byte[] data) {
|
||||
try {
|
||||
GetPlayerTokenRsp p = GetPlayerTokenRsp.parseFrom(data);
|
||||
FileUtils.write(KEYS_FOLDER + "/secretKeyBuffer.bin", p.getSecretKeyBytes().toByteArray());
|
||||
FileUtils.write(KEY("/secretKeyBuffer.bin"), p.getSecretKeyBytes().toByteArray());
|
||||
Grasscutter.getLogger().info("Secret Key: " + p.getSecretKey());
|
||||
} catch (Exception e) {
|
||||
Grasscutter.getLogger().error("Crypto error.", e);
|
||||
@@ -50,7 +50,7 @@ public final class Crypto {
|
||||
public static void extractDispatchSeed(String data) {
|
||||
try {
|
||||
QueryCurrRegionHttpRsp p = QueryCurrRegionHttpRsp.parseFrom(Base64.getDecoder().decode(data));
|
||||
FileUtils.write(KEYS_FOLDER + "/dispatchSeed.bin", p.getRegionInfo().getSecretKey().toByteArray());
|
||||
FileUtils.write(KEY("/dispatchSeed.bin"), p.getRegionInfo().getSecretKey().toByteArray());
|
||||
} catch (Exception e) {
|
||||
Grasscutter.getLogger().error("Crypto error.", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user