Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Decompilers online
- File Name: launcher.jar, Done.
- Java decompilers
- APK decompiler
- ApkTool online
- Download Jad
- Decompilation Results
- Decompilation Results
- File Name: launcher.jar
- Decompiler: CFR
- Job status: Done.
- Twitter Facebook Google+ Stumbleupon LinkedIn
- launcher.jar de notaviable alphalauncher Main.java
- /*
- * Decompiled with CFR 0_118.
- */
- package de.notaviable.alphalauncher;
- import de.notaviable.alphalauncher.Connection;
- import de.notaviable.alphalauncher.datastore.ConfigFile;
- import de.notaviable.alphalauncher.gui.GUI;
- import de.notaviable.alphalauncher.gui.GuiScreen;
- import de.notaviable.alphalauncher.gui.screens.GuiClientSelection;
- import de.notaviable.alphalauncher.injection.InjectionClassLoader;
- import de.notaviable.alphalauncher.utils.Constants;
- import de.notaviable.alphalauncher.utils.IOUtils;
- import de.notaviable.alphalauncher.utils.Utils;
- import java.io.ByteArrayOutputStream;
- import java.io.File;
- import java.io.InputStream;
- import java.io.OutputStream;
- import java.io.PrintStream;
- import java.net.HttpURLConnection;
- import java.net.URL;
- import java.net.URLConnection;
- import java.security.MessageDigest;
- import java.util.List;
- import java.util.Objects;
- import javax.swing.JOptionPane;
- import javax.swing.UIManager;
- public class Main {
- private static Main instance;
- public Connection connection;
- public GUI gui;
- public InjectionClassLoader cl;
- public File launcher_dir;
- public ConfigFile cfg;
- public String launched;
- public String launchedLocation;
- public Main(String[] args) {
- String termsHash;
- String terms;
- this.launcher_dir = new File(System.getProperty("user.home") + "//.AlphaLauncher//");
- this.launched = "nothing";
- System.out.println("AlphaLauncher (c) notaviable 2016");
- System.out.println("Design by VertexCode");
- System.out.println("All rights reserved.");
- try {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- }
- catch (Exception var2_2) {}
- try {
- this.launchedLocation = args.length == 1 ? args[0] : "";
- }
- catch (Exception var2_3) {}
- instance = this;
- IOUtils.cleanDir(new File(this.launcher_dir, "//natives//"));
- this.cfg = new ConfigFile(this.launcher_dir.getAbsolutePath() + "//config.cfg");
- if (this.cfg.get("theme") == null) {
- this.cfg.set("theme", "dark");
- }
- if (this.cfg.get("receivedbytes") == null) {
- this.cfg.set("receivedbytes", "0");
- }
- if (this.cfg.get("sentbytes") == null) {
- this.cfg.set("sentbytes", "0");
- }
- if (this.cfg.get("remember_me") == null) {
- this.cfg.set("remember_me", "false");
- } else if (this.cfg.get("remember_me").equalsIgnoreCase("true")) {
- if (this.cfg.get("username") != null) {
- Constants.username = this.cfg.get("username");
- }
- if (this.cfg.get("password") != null) {
- Constants.password = this.cfg.get("password");
- }
- }
- Object var2_4 = null;
- Object var3_5 = null;
- try {
- void md5;
- void tos;
- void bout;
- void urlConnection;
- void inputStream;
- URL uRL = new URL("http://alpha-centauri.tk/TOS.txt");
- HttpURLConnection httpURLConnection = (HttpURLConnection)tos.openConnection();
- InputStream inputStream2 = urlConnection.getInputStream();
- ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
- IOUtils.copyStream((InputStream)inputStream, (OutputStream)bout);
- MessageDigest messageDigest = MessageDigest.getInstance("MD5");
- termsHash = Utils.bytesToHex(md5.digest(bout.toByteArray()));
- terms = new String(bout.toByteArray());
- }
- catch (Exception tos) {
- System.out.println("Failed checking TOS");
- }
- if (this.cfg.get("tos") == null || terms == null || !Objects.equals(this.cfg.get("tos"), termsHash)) {
- void opt;
- int e = JOptionPane.showConfirmDialog(null, "Do you accept the " + (this.cfg.get("tos") != null ? "updated " : "") + "Terms of Services ( https://alpha-centauri.tk/TOS.txt )", "Terms of Services", 0, 3);
- if (opt == false) {
- this.cfg.set("tos", termsHash);
- } else {
- System.exit(0);
- }
- }
- this.cl = new InjectionClassLoader(Thread.currentThread().getContextClassLoader());
- Thread.currentThread().setContextClassLoader(this.cl);
- Constants.clients.add("Connecting to server...");
- this.gui = new GUI();
- this.gui.setVisible(true);
- try {
- System.out.println("Connecting...");
- this.connection = new Connection();
- System.out.println("Connected!");
- if (this.gui.currentScreen instanceof GuiClientSelection) {
- ((GuiClientSelection)this.gui.currentScreen).selectedClient = "";
- }
- }
- catch (Exception opt) {
- void e;
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement