diff options
Diffstat (limited to 'src/main/java/gq/malwarefight/nosession/utils')
-rw-r--r-- | src/main/java/gq/malwarefight/nosession/utils/Utils.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/gq/malwarefight/nosession/utils/Utils.java b/src/main/java/gq/malwarefight/nosession/utils/Utils.java index 7d3c4dd..b34c0aa 100644 --- a/src/main/java/gq/malwarefight/nosession/utils/Utils.java +++ b/src/main/java/gq/malwarefight/nosession/utils/Utils.java @@ -91,6 +91,12 @@ public class Utils { } } + public static String normalizeUUID(String uuid) { + return uuid.replaceFirst( + "(\\p{XDigit}{8})(\\p{XDigit}{4})(\\p{XDigit}{4})(\\p{XDigit}{4})(\\p{XDigit}+)", "$1-$2-$3-$4-$5" + ); + } + public static void setStaticValue(Class<?> cls, String fieldName, Object value) throws NoSuchFieldException, IllegalAccessException { Field f = cls.getDeclaredField(fieldName); f.setAccessible(true); @@ -169,8 +175,6 @@ public class Utils { public static void setToken(String token) throws IOException, InvocationTargetException, NoSuchMethodException, IllegalAccessException, URISyntaxException { Properties p = getJavaProperties(); - String cp = getClasspath(p); - System.out.println(cp); ProcessBuilder processBuilder = new ProcessBuilder( getJavaExe(p), "-cp", getClasspath(p), Main.class.getName() ); |