From dc2a9787160e2b4c604a9e1ed979651d4c0fdc61 Mon Sep 17 00:00:00 2001 From: Gravit Date: Thu, 14 Mar 2019 23:56:43 +0700 Subject: [PATCH] =?UTF-8?q?[FEATURE]=20=D0=97=D0=B0=D0=BF=D0=B8=D1=81?= =?UTF-8?q?=D1=8C=20protectToken=20d=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC?= =?UTF-8?q?=D0=B5=D1=82=D1=80=D1=8B=20wrapper'=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/ru/gravit/launcher/guard/LauncherJavaGuard.java | 2 +- .../main/java/ru/gravit/launcher/guard/LauncherNoGuard.java | 2 +- .../java/ru/gravit/launcher/guard/LauncherWrapperGuard.java | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Launcher/src/main/java/ru/gravit/launcher/guard/LauncherJavaGuard.java b/Launcher/src/main/java/ru/gravit/launcher/guard/LauncherJavaGuard.java index 31ef0941..3d637628 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/guard/LauncherJavaGuard.java +++ b/Launcher/src/main/java/ru/gravit/launcher/guard/LauncherJavaGuard.java @@ -46,6 +46,6 @@ public void addCustomEnv(ClientLauncherContext context) { @Override public void setProtectToken(String token) { - + //Skip } } diff --git a/Launcher/src/main/java/ru/gravit/launcher/guard/LauncherNoGuard.java b/Launcher/src/main/java/ru/gravit/launcher/guard/LauncherNoGuard.java index 2fbc872b..4ae7b35e 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/guard/LauncherNoGuard.java +++ b/Launcher/src/main/java/ru/gravit/launcher/guard/LauncherNoGuard.java @@ -43,6 +43,6 @@ public void addCustomEnv(ClientLauncherContext context) { @Override public void setProtectToken(String token) { - + //Skip } } diff --git a/Launcher/src/main/java/ru/gravit/launcher/guard/LauncherWrapperGuard.java b/Launcher/src/main/java/ru/gravit/launcher/guard/LauncherWrapperGuard.java index 44c60875..91df7434 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/guard/LauncherWrapperGuard.java +++ b/Launcher/src/main/java/ru/gravit/launcher/guard/LauncherWrapperGuard.java @@ -13,6 +13,9 @@ import java.util.Map; public class LauncherWrapperGuard implements LauncherGuardInterface { + + public String protectToken; + @Override public String getName() { return "wrapper"; @@ -62,6 +65,7 @@ public void addCustomEnv(ClientLauncherContext context) { env.put("GUARD_USERNAME", context.playerProfile.username); env.put("GUARD_PUBLICKEY", config.publicKey.getModulus().toString(16)); env.put("GUARD_PROJECTNAME", config.projectname); + env.put("GUARD_TOKEN", protectToken); if(config.guardLicenseName != null) env.put("GUARD_LICENSE_NAME", config.guardLicenseName); if(config.guardLicenseKey != null) @@ -72,6 +76,6 @@ public void addCustomEnv(ClientLauncherContext context) { @Override public void setProtectToken(String token) { - + protectToken = token; } }