Advertisement
Guest User

Untitled

a guest
May 1st, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.29 KB | None | 0 0
  1.  
  2. Decompilers online
  3.  
  4. File Name: launcher.jar, Done.
  5.  
  6. Java decompilers
  7. APK decompiler
  8. ApkTool online
  9. Download Jad
  10.  
  11. Decompilation Results
  12. Decompilation Results
  13. File Name: launcher.jar
  14. Decompiler: CFR
  15. Job status: Done.
  16.  
  17.  
  18.  
  19. Twitter Facebook Google+ Stumbleupon LinkedIn
  20.  
  21. launcher.jar de notaviable alphalauncher Main.java
  22.  
  23. /*
  24. * Decompiled with CFR 0_118.
  25. */
  26. package de.notaviable.alphalauncher;
  27.  
  28. import de.notaviable.alphalauncher.Connection;
  29. import de.notaviable.alphalauncher.datastore.ConfigFile;
  30. import de.notaviable.alphalauncher.gui.GUI;
  31. import de.notaviable.alphalauncher.gui.GuiScreen;
  32. import de.notaviable.alphalauncher.gui.screens.GuiClientSelection;
  33. import de.notaviable.alphalauncher.injection.InjectionClassLoader;
  34. import de.notaviable.alphalauncher.utils.Constants;
  35. import de.notaviable.alphalauncher.utils.IOUtils;
  36. import de.notaviable.alphalauncher.utils.Utils;
  37. import java.io.ByteArrayOutputStream;
  38. import java.io.File;
  39. import java.io.InputStream;
  40. import java.io.OutputStream;
  41. import java.io.PrintStream;
  42. import java.net.HttpURLConnection;
  43. import java.net.URL;
  44. import java.net.URLConnection;
  45. import java.security.MessageDigest;
  46. import java.util.List;
  47. import java.util.Objects;
  48. import javax.swing.JOptionPane;
  49. import javax.swing.UIManager;
  50.  
  51. public class Main {
  52. private static Main instance;
  53. public Connection connection;
  54. public GUI gui;
  55. public InjectionClassLoader cl;
  56. public File launcher_dir;
  57. public ConfigFile cfg;
  58. public String launched;
  59. public String launchedLocation;
  60.  
  61. public Main(String[] args) {
  62. String termsHash;
  63. String terms;
  64. this.launcher_dir = new File(System.getProperty("user.home") + "//.AlphaLauncher//");
  65. this.launched = "nothing";
  66. System.out.println("AlphaLauncher (c) notaviable 2016");
  67. System.out.println("Design by VertexCode");
  68. System.out.println("All rights reserved.");
  69. try {
  70. UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  71. }
  72. catch (Exception var2_2) {}
  73. try {
  74. this.launchedLocation = args.length == 1 ? args[0] : "";
  75. }
  76. catch (Exception var2_3) {}
  77. instance = this;
  78. IOUtils.cleanDir(new File(this.launcher_dir, "//natives//"));
  79. this.cfg = new ConfigFile(this.launcher_dir.getAbsolutePath() + "//config.cfg");
  80. if (this.cfg.get("theme") == null) {
  81. this.cfg.set("theme", "dark");
  82. }
  83. if (this.cfg.get("receivedbytes") == null) {
  84. this.cfg.set("receivedbytes", "0");
  85. }
  86. if (this.cfg.get("sentbytes") == null) {
  87. this.cfg.set("sentbytes", "0");
  88. }
  89. if (this.cfg.get("remember_me") == null) {
  90. this.cfg.set("remember_me", "false");
  91. } else if (this.cfg.get("remember_me").equalsIgnoreCase("true")) {
  92. if (this.cfg.get("username") != null) {
  93. Constants.username = this.cfg.get("username");
  94. }
  95. if (this.cfg.get("password") != null) {
  96. Constants.password = this.cfg.get("password");
  97. }
  98. }
  99. Object var2_4 = null;
  100. Object var3_5 = null;
  101. try {
  102. void md5;
  103. void tos;
  104. void bout;
  105. void urlConnection;
  106. void inputStream;
  107. URL uRL = new URL("http://alpha-centauri.tk/TOS.txt");
  108. HttpURLConnection httpURLConnection = (HttpURLConnection)tos.openConnection();
  109. InputStream inputStream2 = urlConnection.getInputStream();
  110. ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
  111. IOUtils.copyStream((InputStream)inputStream, (OutputStream)bout);
  112. MessageDigest messageDigest = MessageDigest.getInstance("MD5");
  113. termsHash = Utils.bytesToHex(md5.digest(bout.toByteArray()));
  114. terms = new String(bout.toByteArray());
  115. }
  116. catch (Exception tos) {
  117. System.out.println("Failed checking TOS");
  118. }
  119. if (this.cfg.get("tos") == null || terms == null || !Objects.equals(this.cfg.get("tos"), termsHash)) {
  120. void opt;
  121. 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);
  122. if (opt == false) {
  123. this.cfg.set("tos", termsHash);
  124. } else {
  125. System.exit(0);
  126. }
  127. }
  128. this.cl = new InjectionClassLoader(Thread.currentThread().getContextClassLoader());
  129. Thread.currentThread().setContextClassLoader(this.cl);
  130. Constants.clients.add("Connecting to server...");
  131. this.gui = new GUI();
  132. this.gui.setVisible(true);
  133. try {
  134. System.out.println("Connecting...");
  135. this.connection = new Connection();
  136. System.out.println("Connected!");
  137. if (this.gui.currentScreen instanceof GuiClientSelection) {
  138. ((GuiClientSelection)this.gui.currentScreen).selectedClient = "";
  139. }
  140. }
  141. catch (Exception opt) {
  142. void e;
  143. e.printStackTrace();
  144. }
  145. }
  146. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement