aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gq/malwarefight/tokenapp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gq/malwarefight/tokenapp')
-rw-r--r--src/main/java/gq/malwarefight/tokenapp/Main.java3
-rw-r--r--src/main/java/gq/malwarefight/tokenapp/SocketThread.java4
2 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/gq/malwarefight/tokenapp/Main.java b/src/main/java/gq/malwarefight/tokenapp/Main.java
index 62a4da3..ecea1f3 100644
--- a/src/main/java/gq/malwarefight/tokenapp/Main.java
+++ b/src/main/java/gq/malwarefight/tokenapp/Main.java
@@ -15,13 +15,13 @@ import java.util.UUID;
public class Main {
public static final int BASE_PORT = 47777;
- public static long ID;
public static YggdrasilMinecraftSessionService sessionService = null;
public static YggdrasilAuthenticationService authenticationService = null;
public static GameProfile gameProfile = null;
public static void setup() throws IOException {
String token = Utils.readString(System.in, '\n');
+ System.out.println(token);
YggdrasilAuthenticationService yas = new YggdrasilAuthenticationService(Proxy.NO_PROXY, token);
authenticationService = yas;
sessionService = (YggdrasilMinecraftSessionService) yas.createMinecraftSessionService();
@@ -40,7 +40,6 @@ public class Main {
}
public static void main(String[] args) {
- ID = Long.parseLong(args[0]);
try {
setup();
} catch (Exception e) {
diff --git a/src/main/java/gq/malwarefight/tokenapp/SocketThread.java b/src/main/java/gq/malwarefight/tokenapp/SocketThread.java
index de029c1..f2d0be7 100644
--- a/src/main/java/gq/malwarefight/tokenapp/SocketThread.java
+++ b/src/main/java/gq/malwarefight/tokenapp/SocketThread.java
@@ -50,8 +50,8 @@ public class SocketThread extends Thread {
sock.close();
} else if ("fullquit".equals(parts[0])) {
System.exit(0);
- } else if ("id".equals(parts[0])) {
- writeResponse(Long.toString(Main.ID), out);
+ } else if ("uuid".equals(parts[0])) {
+ writeResponse(Main.gameProfile.getId().toString(), out);
} else {
writeResponse("418 I'm a teapot", out);
}