[ANY] Рефакторинг.

This commit is contained in:
Zaxar163 2019-11-28 18:01:04 +01:00
parent af88a02a52
commit 97b30aa234
No known key found for this signature in database
GPG key ID: 1FE4F2E1F053831B
10 changed files with 2 additions and 35 deletions

View file

@ -3,9 +3,6 @@
import pro.gravit.launcher.Launcher;
import pro.gravit.launchserver.LaunchServer;
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.nio.file.Files;

View file

@ -70,7 +70,7 @@ public String[] buildConfig(Path inputJar, Path outputJar) {
.map(e -> "-libraryjars \'" + e.toAbsolutePath().toString() + "\'")
.forEach(confStrs::add);
confStrs.add("-classobfuscationdictionary \'" + words.toFile().getName() + "\'");
confStrs.add(readConf());
confStrs.add("@".concat(config.toFile().getName()));
return confStrs.toArray(new String[0]);
}
@ -102,8 +102,4 @@ public void prepare(boolean force) {
LogHelper.error(e);
}
}
private String readConf() {
return "@".concat(config.toFile().getName());
}
}

View file

@ -20,7 +20,6 @@
import java.math.BigInteger;
import java.nio.file.Path;
import java.security.cert.Certificate;
import java.security.cert.CertificateEncodingException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.time.LocalDate;

View file

@ -23,7 +23,6 @@
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.security.cert.CertificateEncodingException;
import java.security.cert.X509Certificate;
import java.util.*;
import java.util.jar.JarFile;
import java.util.stream.Collectors;

View file

@ -1,17 +1,8 @@
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.CMSSignedDataGenerator;
import org.bouncycastle.operator.ContentSigner;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
import pro.gravit.launchserver.LaunchServer;
import pro.gravit.launchserver.binary.SignerJar;
import pro.gravit.launchserver.config.LaunchServerConfig;
@ -21,23 +12,12 @@
import java.io.File;
import java.io.IOException;
import java.math.BigInteger;
import java.nio.file.Path;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.UnrecoverableKeyException;
import java.security.cert.Certificate;
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.zip.ZipEntry;
import java.util.zip.ZipInputStream;

View file

@ -4,7 +4,6 @@
import net.sf.launch4j.Log;
import net.sf.launch4j.config.*;
import pro.gravit.launchserver.LaunchServer;
import pro.gravit.launchserver.binary.EXEL4JLauncherBinary;
import pro.gravit.launchserver.binary.tasks.LauncherBuildTask;
import pro.gravit.utils.Version;
import pro.gravit.utils.helper.IOHelper;

View file

@ -1,7 +1,6 @@
package pro.gravit.launchserver.socket.response.update;
import io.netty.channel.ChannelHandlerContext;
import pro.gravit.launcher.events.request.ErrorRequestEvent;
import pro.gravit.launcher.events.request.UpdateRequestEvent;
import pro.gravit.launcher.hasher.HashedDir;
import pro.gravit.launcher.profiles.ClientProfile;

View file

@ -1,7 +1,6 @@
package pro.gravit.launcher.client;
import pro.gravit.launcher.ClientLauncherWrapper;
import pro.gravit.launcher.Launcher;
import pro.gravit.launcher.guard.LauncherGuardManager;
import pro.gravit.launcher.hasher.HashedDir;
import pro.gravit.launcher.managers.ClientHookManager;

View file

@ -1,6 +1,5 @@
package pro.gravit.utils.helper;
import java.io.OutputStream;
import java.util.Objects;
import java.util.function.LongSupplier;

View file

@ -52,7 +52,7 @@ public ServerWrapper(Type type, Path configPath) {
public boolean auth() {
try {
LauncherConfig cfg = Launcher.getConfig();
Launcher.getConfig();
AuthRequest request = new AuthRequest(config.login, config.password, config.auth_id, AuthRequest.ConnectTypes.SERVER);
permissions = request.request().permissions;
ProfilesRequestEvent result = new ProfilesRequest().request();