mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-19 14:33:04 +03:00
[FEATURE] Выкинул config.bin
This commit is contained in:
parent
888a3a92d9
commit
9881694884
10 changed files with 49 additions and 98 deletions
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class ConfigGenerator {
|
public class ConfigGenerator {
|
||||||
protected static final String stringDesc = Type.getDescriptor(String.class);
|
protected static final String stringDesc = Type.getDescriptor(String.class);
|
||||||
|
@ -64,6 +65,23 @@ public void setByteArrayListField(String name, List<byte[]> b) {
|
||||||
constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, configclass.name, name, "Ljava/util/List;"));
|
constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, configclass.name, name, "Ljava/util/List;"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setStringByteArrMapField(String name, Map<String, byte[]> b) {
|
||||||
|
constructor.instructions.add(new VarInsnNode(Opcodes.ALOAD, 0));
|
||||||
|
constructor.instructions.add(new TypeInsnNode(Opcodes.NEW, "java/util/HashMap"));
|
||||||
|
constructor.instructions.add(new InsnNode(Opcodes.DUP)); // +1
|
||||||
|
constructor.instructions.add(new MethodInsnNode(Opcodes.INVOKESPECIAL, "java/util/HashMap", "<init>", "()V"));
|
||||||
|
for (Map.Entry<String, byte[]> value : b.entrySet()) {
|
||||||
|
constructor.instructions.add(new InsnNode(Opcodes.DUP)); // +1-1
|
||||||
|
constructor.instructions.add(NodeUtils.getSafeStringInsnList(value.getKey()));
|
||||||
|
constructor.instructions.add(new MethodInsnNode(Opcodes.INVOKESTATIC, "java/util/Base64", "getDecoder", "()Ljava/util/Base64$Decoder;", false));
|
||||||
|
constructor.instructions.add(NodeUtils.getSafeStringInsnList(Base64.getEncoder().encodeToString(value.getValue())));
|
||||||
|
constructor.instructions.add(new MethodInsnNode(Opcodes.INVOKEVIRTUAL, "java/util/Base64$Decoder", "decode", base64DecDesc, false));
|
||||||
|
constructor.instructions.add(new MethodInsnNode(Opcodes.INVOKEINTERFACE, "java/util/Map", "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", true));
|
||||||
|
constructor.instructions.add(new InsnNode(Opcodes.POP));
|
||||||
|
} // haax!
|
||||||
|
constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, configclass.name, name, "Ljava/util/List;"));
|
||||||
|
}
|
||||||
|
|
||||||
public void setIntegerField(String name, int value) {
|
public void setIntegerField(String name, int value) {
|
||||||
constructor.instructions.add(new VarInsnNode(Opcodes.ALOAD, 0));
|
constructor.instructions.add(new VarInsnNode(Opcodes.ALOAD, 0));
|
||||||
constructor.instructions.add(NodeUtils.push(value));
|
constructor.instructions.add(NodeUtils.push(value));
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
import pro.gravit.launcher.Launcher;
|
import pro.gravit.launcher.Launcher;
|
||||||
import pro.gravit.launchserver.LaunchServer;
|
import pro.gravit.launchserver.LaunchServer;
|
||||||
import pro.gravit.launchserver.binary.tasks.*;
|
import pro.gravit.launchserver.binary.tasks.*;
|
||||||
import pro.gravit.utils.helper.CommonHelper;
|
|
||||||
import pro.gravit.utils.helper.IOHelper;
|
|
||||||
import pro.gravit.utils.helper.LogHelper;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.security.cert.Certificate;
|
import java.security.cert.Certificate;
|
||||||
import java.security.cert.CertificateEncodingException;
|
|
||||||
import java.security.cert.CertificateException;
|
import java.security.cert.CertificateException;
|
||||||
import java.security.cert.X509Certificate;
|
import java.security.cert.X509Certificate;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
|
@ -4,9 +4,8 @@
|
||||||
import org.objectweb.asm.tree.ClassNode;
|
import org.objectweb.asm.tree.ClassNode;
|
||||||
import pro.gravit.launcher.AutogenConfig;
|
import pro.gravit.launcher.AutogenConfig;
|
||||||
import pro.gravit.launcher.Launcher;
|
import pro.gravit.launcher.Launcher;
|
||||||
import pro.gravit.launcher.LauncherConfig;
|
|
||||||
import pro.gravit.launcher.SecureAutogenConfig;
|
import pro.gravit.launcher.SecureAutogenConfig;
|
||||||
import pro.gravit.launcher.serialize.HOutput;
|
import pro.gravit.launcher.SimpleAutogenConfig;
|
||||||
import pro.gravit.launchserver.LaunchServer;
|
import pro.gravit.launchserver.LaunchServer;
|
||||||
import pro.gravit.launchserver.asm.ClassMetadataReader;
|
import pro.gravit.launchserver.asm.ClassMetadataReader;
|
||||||
import pro.gravit.launchserver.asm.ConfigGenerator;
|
import pro.gravit.launchserver.asm.ConfigGenerator;
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
import java.nio.file.SimpleFileVisitor;
|
import java.nio.file.SimpleFileVisitor;
|
||||||
import java.nio.file.attribute.BasicFileAttributes;
|
import java.nio.file.attribute.BasicFileAttributes;
|
||||||
import java.security.cert.CertificateEncodingException;
|
import java.security.cert.CertificateEncodingException;
|
||||||
import java.security.cert.X509Certificate;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.jar.JarFile;
|
import java.util.jar.JarFile;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
@ -126,6 +124,9 @@ public Path process(Path inputJar) throws IOException {
|
||||||
ClassNode cn1 = new ClassNode();
|
ClassNode cn1 = new ClassNode();
|
||||||
new ClassReader(IOHelper.getResourceBytes(SecureAutogenConfig.class.getName().replace('.', '/').concat(".class"))).accept(cn1, 0);
|
new ClassReader(IOHelper.getResourceBytes(SecureAutogenConfig.class.getName().replace('.', '/').concat(".class"))).accept(cn1, 0);
|
||||||
ConfigGenerator secureConfigurator = new ConfigGenerator(cn1);
|
ConfigGenerator secureConfigurator = new ConfigGenerator(cn1);
|
||||||
|
ClassNode cn2 = new ClassNode();
|
||||||
|
new ClassReader(IOHelper.getResourceBytes(SimpleAutogenConfig.class.getName().replace('.', '/').concat(".class"))).accept(cn2, 0);
|
||||||
|
ConfigGenerator runtimeConfigurator = new ConfigGenerator(cn2);
|
||||||
BuildContext context = new BuildContext(output, launcherConfigurator, this);
|
BuildContext context = new BuildContext(output, launcherConfigurator, this);
|
||||||
server.buildHookManager.hook(context);
|
server.buildHookManager.hook(context);
|
||||||
launcherConfigurator.setStringField("address", server.config.netty.address);
|
launcherConfigurator.setStringField("address", server.config.netty.address);
|
||||||
|
@ -173,11 +174,12 @@ public Path process(Path inputJar) throws IOException {
|
||||||
});
|
});
|
||||||
String zPath = launcherConfigurator.getZipEntryPath();
|
String zPath = launcherConfigurator.getZipEntryPath();
|
||||||
String sPath = secureConfigurator.getZipEntryPath();
|
String sPath = secureConfigurator.getZipEntryPath();
|
||||||
|
String rPath = runtimeConfigurator.getZipEntryPath();
|
||||||
try (ZipInputStream input = new ZipInputStream(IOHelper.newInput(inputJar))) {
|
try (ZipInputStream input = new ZipInputStream(IOHelper.newInput(inputJar))) {
|
||||||
ZipEntry e = input.getNextEntry();
|
ZipEntry e = input.getNextEntry();
|
||||||
while (e != null) {
|
while (e != null) {
|
||||||
String filename = e.getName();
|
String filename = e.getName();
|
||||||
if (server.buildHookManager.isContainsBlacklist(filename) || e.isDirectory() || zPath.equals(filename) || sPath.equals(filename)) {
|
if (server.buildHookManager.isContainsBlacklist(filename) || e.isDirectory() || zPath.equals(filename) || sPath.equals(filename) || rPath.equals(filename)) {
|
||||||
e = input.getNextEntry();
|
e = input.getNextEntry();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -209,26 +211,17 @@ public Path process(Path inputJar) throws IOException {
|
||||||
output.putNextEntry(newZipEntry(ent.getKey().replace('.', '/').concat(".class")));
|
output.putNextEntry(newZipEntry(ent.getKey().replace('.', '/').concat(".class")));
|
||||||
output.write(server.buildHookManager.classTransform(ent.getValue(), ent.getKey(), this));
|
output.write(server.buildHookManager.classTransform(ent.getValue(), ent.getKey(), this));
|
||||||
}
|
}
|
||||||
// map for guard
|
// Create launcher config file
|
||||||
Map<String, byte[]> runtime = new HashMap<>(256);
|
Map<String, byte[]> runtime = new HashMap<>(256);
|
||||||
if (server.buildHookManager.buildRuntime()) {
|
if (server.buildHookManager.buildRuntime()) {
|
||||||
// Write launcher guard dir
|
|
||||||
IOHelper.walk(server.launcherBinary.runtimeDir, new RuntimeDirVisitor(output, runtime), false);
|
IOHelper.walk(server.launcherBinary.runtimeDir, new RuntimeDirVisitor(output, runtime), false);
|
||||||
IOHelper.walk(server.launcherBinary.guardDir, new GuardDirVisitor(output, runtime), false);
|
IOHelper.walk(server.launcherBinary.guardDir, new GuardDirVisitor(output, runtime), false);
|
||||||
}
|
}
|
||||||
// Create launcher config file
|
runtimeConfigurator.setStringByteArrMapField("entries", runtime);
|
||||||
byte[] launcherConfigBytes;
|
runtimeConfigurator.setByteArrayField("key", server.publicKey.getEncoded());
|
||||||
try (ByteArrayOutputStream configArray = IOHelper.newByteArrayOutput()) {
|
|
||||||
try (HOutput configOutput = new HOutput(configArray)) {
|
|
||||||
new LauncherConfig(server.config.netty.address, server.publicKey, runtime, server.config.projectName)
|
|
||||||
.write(configOutput);
|
|
||||||
}
|
|
||||||
launcherConfigBytes = configArray.toByteArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Write launcher config file
|
// Write launcher config file
|
||||||
output.putNextEntry(newZipEntry(Launcher.CONFIG_FILE));
|
output.putNextEntry(newZipEntry(rPath));
|
||||||
output.write(launcherConfigBytes);
|
output.write(runtimeConfigurator.getBytecode(reader));
|
||||||
ZipEntry e = newZipEntry(zPath);
|
ZipEntry e = newZipEntry(zPath);
|
||||||
output.putNextEntry(e);
|
output.putNextEntry(e);
|
||||||
output.write(launcherConfigurator.getBytecode(reader));
|
output.write(launcherConfigurator.getBytecode(reader));
|
||||||
|
|
|
@ -1,17 +1,8 @@
|
||||||
package pro.gravit.launchserver.binary.tasks;
|
package pro.gravit.launchserver.binary.tasks;
|
||||||
|
|
||||||
import org.bouncycastle.asn1.x500.X500Name;
|
|
||||||
import org.bouncycastle.asn1.x500.X500NameBuilder;
|
|
||||||
import org.bouncycastle.asn1.x500.style.BCStyle;
|
|
||||||
import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo;
|
|
||||||
import org.bouncycastle.cert.X509CertificateHolder;
|
|
||||||
import org.bouncycastle.cert.X509v3CertificateBuilder;
|
|
||||||
import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter;
|
|
||||||
import org.bouncycastle.cms.CMSException;
|
import org.bouncycastle.cms.CMSException;
|
||||||
import org.bouncycastle.cms.CMSSignedDataGenerator;
|
import org.bouncycastle.cms.CMSSignedDataGenerator;
|
||||||
import org.bouncycastle.operator.ContentSigner;
|
|
||||||
import org.bouncycastle.operator.OperatorCreationException;
|
import org.bouncycastle.operator.OperatorCreationException;
|
||||||
import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
|
|
||||||
import pro.gravit.launchserver.LaunchServer;
|
import pro.gravit.launchserver.LaunchServer;
|
||||||
import pro.gravit.launchserver.binary.SignerJar;
|
import pro.gravit.launchserver.binary.SignerJar;
|
||||||
import pro.gravit.launchserver.config.LaunchServerConfig;
|
import pro.gravit.launchserver.config.LaunchServerConfig;
|
||||||
|
@ -21,23 +12,12 @@
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.math.BigInteger;
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.security.KeyStore;
|
import java.security.KeyStore;
|
||||||
import java.security.KeyStoreException;
|
import java.security.KeyStoreException;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.security.UnrecoverableKeyException;
|
import java.security.UnrecoverableKeyException;
|
||||||
import java.security.cert.Certificate;
|
|
||||||
import java.security.cert.CertificateEncodingException;
|
import java.security.cert.CertificateEncodingException;
|
||||||
import java.security.cert.CertificateException;
|
|
||||||
import java.security.cert.X509Certificate;
|
|
||||||
import java.security.interfaces.ECPrivateKey;
|
|
||||||
import java.security.interfaces.ECPublicKey;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.jar.Manifest;
|
import java.util.jar.Manifest;
|
||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipInputStream;
|
import java.util.zip.ZipInputStream;
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
import net.sf.launch4j.Log;
|
import net.sf.launch4j.Log;
|
||||||
import net.sf.launch4j.config.*;
|
import net.sf.launch4j.config.*;
|
||||||
import pro.gravit.launchserver.LaunchServer;
|
import pro.gravit.launchserver.LaunchServer;
|
||||||
import pro.gravit.launchserver.binary.EXEL4JLauncherBinary;
|
|
||||||
import pro.gravit.launchserver.binary.tasks.LauncherBuildTask;
|
import pro.gravit.launchserver.binary.tasks.LauncherBuildTask;
|
||||||
import pro.gravit.utils.Version;
|
import pro.gravit.utils.Version;
|
||||||
import pro.gravit.utils.helper.IOHelper;
|
import pro.gravit.utils.helper.IOHelper;
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import pro.gravit.launcher.managers.GsonManager;
|
import pro.gravit.launcher.managers.GsonManager;
|
||||||
import pro.gravit.launcher.profiles.ClientProfile;
|
import pro.gravit.launcher.profiles.ClientProfile;
|
||||||
import pro.gravit.launcher.serialize.HInput;
|
|
||||||
import pro.gravit.utils.helper.IOHelper;
|
import pro.gravit.utils.helper.IOHelper;
|
||||||
import pro.gravit.utils.helper.LogHelper;
|
import pro.gravit.utils.helper.LogHelper;
|
||||||
import pro.gravit.utils.helper.SecurityHelper;
|
import pro.gravit.utils.helper.SecurityHelper;
|
||||||
|
@ -18,7 +17,6 @@
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
public final class Launcher {
|
public final class Launcher {
|
||||||
|
|
||||||
// Authlib constants
|
// Authlib constants
|
||||||
@LauncherAPI
|
@LauncherAPI
|
||||||
public static final String SKIN_URL_PROPERTY = "skinURL";
|
public static final String SKIN_URL_PROPERTY = "skinURL";
|
||||||
|
@ -43,8 +41,6 @@ public final class Launcher {
|
||||||
@LauncherAPI
|
@LauncherAPI
|
||||||
public static final String GUARD_DIR = "guard";
|
public static final String GUARD_DIR = "guard";
|
||||||
@LauncherAPI
|
@LauncherAPI
|
||||||
public static final String CONFIG_FILE = "config.bin";
|
|
||||||
@LauncherAPI
|
|
||||||
public static ClientProfile profile;
|
public static ClientProfile profile;
|
||||||
@LauncherAPI
|
@LauncherAPI
|
||||||
public static final String INIT_SCRIPT_FILE = "init.js";
|
public static final String INIT_SCRIPT_FILE = "init.js";
|
||||||
|
@ -59,8 +55,8 @@ public final class Launcher {
|
||||||
public static LauncherConfig getConfig() {
|
public static LauncherConfig getConfig() {
|
||||||
LauncherConfig config = CONFIG.get();
|
LauncherConfig config = CONFIG.get();
|
||||||
if (config == null) {
|
if (config == null) {
|
||||||
try (HInput input = new HInput(IOHelper.newInput(IOHelper.getResourceURL(CONFIG_FILE)))) {
|
try {
|
||||||
config = new LauncherConfig(input);
|
config = new LauncherConfig();
|
||||||
} catch (IOException | InvalidKeySpecException e) {
|
} catch (IOException | InvalidKeySpecException e) {
|
||||||
throw new SecurityException(e);
|
throw new SecurityException(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
package pro.gravit.launcher;
|
package pro.gravit.launcher;
|
||||||
|
|
||||||
import pro.gravit.launcher.serialize.HInput;
|
|
||||||
import pro.gravit.launcher.serialize.HOutput;
|
|
||||||
import pro.gravit.launcher.serialize.stream.StreamObject;
|
|
||||||
import pro.gravit.utils.helper.SecurityHelper;
|
import pro.gravit.utils.helper.SecurityHelper;
|
||||||
import pro.gravit.utils.helper.VerifyHelper;
|
|
||||||
import pro.gravit.utils.verify.LauncherTrustManager;
|
import pro.gravit.utils.verify.LauncherTrustManager;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -13,9 +9,10 @@
|
||||||
import java.security.spec.InvalidKeySpecException;
|
import java.security.spec.InvalidKeySpecException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public final class LauncherConfig extends StreamObject {
|
public final class LauncherConfig {
|
||||||
private static final AutogenConfig config = new AutogenConfig();
|
private static final AutogenConfig config = new AutogenConfig();
|
||||||
private static final SecureAutogenConfig secureConfig = new SecureAutogenConfig();
|
private static final SecureAutogenConfig secureConfig = new SecureAutogenConfig();
|
||||||
|
private static final SimpleAutogenConfig runtimeConfig = new SimpleAutogenConfig();
|
||||||
|
|
||||||
|
|
||||||
public static AutogenConfig getAutogenConfig() {
|
public static AutogenConfig getAutogenConfig() {
|
||||||
|
@ -45,9 +42,8 @@ public static AutogenConfig getAutogenConfig() {
|
||||||
public final String secureCheckSalt;
|
public final String secureCheckSalt;
|
||||||
public final String passwordEncryptKey;
|
public final String passwordEncryptKey;
|
||||||
|
|
||||||
@LauncherAPI
|
public LauncherConfig() throws IOException, InvalidKeySpecException {
|
||||||
public LauncherConfig(HInput input) throws IOException, InvalidKeySpecException {
|
publicKey = SecurityHelper.toPublicECKey(runtimeConfig.key);
|
||||||
publicKey = SecurityHelper.toPublicECKey(input.readByteArray(SecurityHelper.CRYPTO_MAX_LENGTH));
|
|
||||||
secureCheckHash = config.secureCheckHash;
|
secureCheckHash = config.secureCheckHash;
|
||||||
secureCheckSalt = config.secureCheckSalt;
|
secureCheckSalt = config.secureCheckSalt;
|
||||||
passwordEncryptKey = config.passwordEncryptKey;
|
passwordEncryptKey = config.passwordEncryptKey;
|
||||||
|
@ -72,46 +68,7 @@ public LauncherConfig(HInput input) throws IOException, InvalidKeySpecException
|
||||||
else env = LauncherEnvironment.STD;
|
else env = LauncherEnvironment.STD;
|
||||||
Launcher.applyLauncherEnv(env);
|
Launcher.applyLauncherEnv(env);
|
||||||
environment = env;
|
environment = env;
|
||||||
// Read signed runtime
|
runtime = Collections.unmodifiableMap(runtimeConfig.entries);
|
||||||
int count = input.readLength(0);
|
|
||||||
Map<String, byte[]> localResources = new HashMap<>(count);
|
|
||||||
for (int i = 0; i < count; i++) {
|
|
||||||
String name = input.readString(255);
|
|
||||||
VerifyHelper.putIfAbsent(localResources, name,
|
|
||||||
input.readByteArray(SecurityHelper.CRYPTO_MAX_LENGTH),
|
|
||||||
String.format("Duplicate runtime resource: '%s'", name));
|
|
||||||
}
|
|
||||||
runtime = Collections.unmodifiableMap(localResources);
|
|
||||||
}
|
|
||||||
|
|
||||||
@LauncherAPI
|
|
||||||
public LauncherConfig(String address, ECPublicKey publicKey, Map<String, byte[]> runtime, String projectName) {
|
|
||||||
this.address = address;
|
|
||||||
this.publicKey = publicKey;
|
|
||||||
this.runtime = Collections.unmodifiableMap(new HashMap<>(runtime));
|
|
||||||
this.projectName = projectName;
|
|
||||||
this.clientPort = 32148;
|
|
||||||
guardType = "no";
|
|
||||||
isWarningMissArchJava = true;
|
|
||||||
isNettyEnabled = false;
|
|
||||||
environment = LauncherEnvironment.STD;
|
|
||||||
secureCheckSalt = null;
|
|
||||||
secureCheckHash = null;
|
|
||||||
passwordEncryptKey = null;
|
|
||||||
trustManager = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(HOutput output) throws IOException {
|
|
||||||
output.writeByteArray(publicKey.getEncoded(), SecurityHelper.CRYPTO_MAX_LENGTH);
|
|
||||||
|
|
||||||
// Write signed runtime
|
|
||||||
Set<Map.Entry<String, byte[]>> entrySet = runtime.entrySet();
|
|
||||||
output.writeLength(entrySet.size(), 0);
|
|
||||||
for (Map.Entry<String, byte[]> entry : runtime.entrySet()) {
|
|
||||||
output.writeString(entry.getKey(), 255);
|
|
||||||
output.writeByteArray(entry.getValue(), SecurityHelper.CRYPTO_MAX_LENGTH);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum LauncherEnvironment {
|
public enum LauncherEnvironment {
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
package pro.gravit.launcher;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class SimpleAutogenConfig {
|
||||||
|
public final Map<String, byte[]> entries;
|
||||||
|
public final byte[] key;
|
||||||
|
|
||||||
|
public SimpleAutogenConfig() {
|
||||||
|
entries = null;
|
||||||
|
key = null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +1,5 @@
|
||||||
package pro.gravit.utils.helper;
|
package pro.gravit.utils.helper;
|
||||||
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.function.LongSupplier;
|
import java.util.function.LongSupplier;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue