I am experimenting with my own Discord client (yes, I know, they are against TOS) and I want to try out automatic account detection. Where does discord keep your tokens or auth keys?
1 Answer
Depends. You could
- launch the default client,
- obtain the process id,
- use
strace
(Linux) orlsof
(Linux/Mac) to check which files are accessed.
You may want to combine these steps in a shell script in order to avoid a large delay between launch and attaching strace
/lsof
, otherwise early access to some files might go undetected.
-
1Thank you. For people that stumble across this post, I used this youtube video (youtu.be/EG0ihttnEJI) to learn how to use strace. I will update this comment with more info as soon as I go through the strace output file. (for windows, everything is in %appdata%)– richmailCommented Jun 9, 2022 at 17:09
-
1So...Discord's stuff on Linux is stored in
~/.config/discord
. The auth tokens are in ~/.config/discord/Local\ Storage/leveldb`. To actually find the auth token you'll have to use this piece of python code. pastebin.com/LdhTqHm0– richmailCommented Jun 10, 2022 at 20:35