Skip to content

Instantly share code, notes, and snippets.

@m-Phoenix852
Created August 26, 2020 07:45
Show Gist options
  • Select an option

  • Save m-Phoenix852/b47fffb0fd579bc210420cedbda30b61 to your computer and use it in GitHub Desktop.

Select an option

Save m-Phoenix852/b47fffb0fd579bc210420cedbda30b61 to your computer and use it in GitHub Desktop.
Simple script to log in to discord account using token.
let token = "your token";
function login(token) {
setInterval(() => {
document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage.token = `"${token}"`
}, 50);
setTimeout(() => {
location.reload();
}, 2500);
}
login(token);
@JakeRuCodes

Copy link
Copy Markdown

Not sure if this'll work but try this :

(function() {
let token = "YOUR_DISCORD_TOKEN";
let ws = new WebSocket("wss://gateway.discord.gg/?v=6&encoding=json");

ws.onopen = function() {
ws.send(
JSON.stringify({
op: 2,
d: {
token: token,
properties: {
$os: "Windows",
$browser: "Chrome",
$device: "Desktop",
},
},
})
);
};

ws.onmessage = function(event) {
let data = JSON.parse(event.data);
if (data.op === 10) {
let interval = data.d.heartbeat_interval;
setInterval(function() {
ws.send(JSON.stringify({ op: 1, d: null }));
}, interval);
}
};
})();

@RandomPerson54163

Copy link
Copy Markdown

None of these methods work. Can anyone pls find a solution to this.

@pxldevv

pxldevv commented Jun 20, 2023

Copy link
Copy Markdown

This code works, just spam it in console and it works. Also use a working token

@JeiLys

JeiLys commented Aug 4, 2023

Copy link
Copy Markdown

please i need your help add me on discord Wiwi#0402 it’s super urgent please

It doesn't work anymore guys. I check the dev tools an saw that each time you paste the token in and refresh instead of it log you in it redirect you back to the login page. Each time you refresh even if you paste the token in the "local storage" but if you refresh it will automatically run another thing it's
+-----------------+---------------------------------+
| tokens | {"user_id_cache": "your token"} |
+-----------------+---------------------------------+
| user_id_cache: | "your_user_id" |
-------------------+---------------------------------+
| token | "your_token" |
+-----------------+---------------------------------+
But even i paste these two value in, each time you reload it just empty the token --> refresher -->
token: {} --> back to the login page

Added

Can you add me on discord for help me pls ? JeiLys.

@pxldevv

pxldevv commented Aug 5, 2023

Copy link
Copy Markdown

please i need your help add me on discord Wiwi#0402 it’s super urgent please

It doesn't work anymore guys. I check the dev tools an saw that each time you paste the token in and refresh instead of it log you in it redirect you back to the login page. Each time you refresh even if you paste the token in the "local storage" but if you refresh it will automatically run another thing it's
+-----------------+---------------------------------+
| tokens | {"user_id_cache": "your token"} |
+-----------------+---------------------------------+
| user_id_cache: | "your_user_id" |
-------------------+---------------------------------+
| token | "your_token" |
+-----------------+---------------------------------+
But even i paste these two value in, each time you reload it just empty the token --> refresher -->
token: {} --> back to the login page

Added

Can you add me on discord for help me pls ? JeiLys.

I sent an invite

@mahonmc

mahonmc commented Aug 14, 2023

Copy link
Copy Markdown

does anyone know how to do it 2023 august i cant find any working tutorials and ima ure my token is positive.

@BBSFire

BBSFire commented Aug 16, 2023

Copy link
Copy Markdown

hello I would need help I lost my discord account and the A2F is connected to it despite the fact that I have sent several times emails to discore they do not want to help me recover it could help me please please

@Weredime

Weredime commented Sep 23, 2023

Copy link
Copy Markdown
document.body.appendChild(document.createElement("iframe")).contentWindow.localStorage.setItem("token", "\"token.here\"");
setTimeout(() => location.reload(), 1000);

should work :D

@wolfy402

Copy link
Copy Markdown

could I get some help pls?

@m8cx

m8cx commented Oct 29, 2023

Copy link
Copy Markdown

could I get some help pls?

do you suffer from the stupid @wolfy402

@KyloSoot

Copy link
Copy Markdown

need help. tried every single one and none works

@m8cx

m8cx commented Nov 9, 2023

Copy link
Copy Markdown

need help. tried every single one and none works

are you acoustic

@Heroscarman

Copy link
Copy Markdown

foes this still work? and what am i supposed to run it on?

@Heroscarman

Copy link
Copy Markdown
document.body.appendChild(document.createElement("iframe")).contentWindow.localStorage.setItem("token", "\"token.here\"");
setTimeout(() => location.reload(), 1000);

should work :D

what do i run it on?

@Heroscarman

Copy link
Copy Markdown

This code works, just spam it in console and it works. Also use a working token

yo how do i do it @Techpro709

@Heroscarman

Copy link
Copy Markdown

PrmWiny

@PrmWiny what did you execute it on?

@SplashAni

Copy link
Copy Markdown

14907.0926618061b4729bc6fb.js:1 Uncaught (in promise) Error: Cannot find module './notosans-400-normalitalic.woff2'
at 14907.0926618061b4729bc6fb.js:1:1348901
at async Promise.all (index 3) it got patched

@pxldevv

pxldevv commented Jan 2, 2024

Copy link
Copy Markdown

14907.0926618061b4729bc6fb.js:1 Uncaught (in promise) Error: Cannot find module './notosans-400-normalitalic.woff2' at 14907.0926618061b4729bc6fb.js:1:1348901 at async Promise.all (index 3) it got patched

Uhh, that seems unrelated.

Still works for me with a fresh token. Message me on discord for help.

Discord username h4f5c0d3sl1k3m4g1c

https://proton.hackclub.com/.t3ch_/

@Heroscarman @SplashAni

@Heroscarman

Copy link
Copy Markdown

@Techpro709 i sent friend request

@Heroscarman

Copy link
Copy Markdown

@Techpro709 are u lying to me

@pycharmergirl

Copy link
Copy Markdown

@Techpro709 is awesome and showed me how to do it! Still works 2024!

@pxldevv

pxldevv commented Jan 9, 2024

Copy link
Copy Markdown

@Techpro709 is awesome and showed me how to do it! Still works 2024!

Thanks for that!

@jsdkfkjljfds

Copy link
Copy Markdown

@Techpro709 Thanks so much for making it work!

@pxldevv

pxldevv commented Jan 16, 2024

Copy link
Copy Markdown

This method was patched, Noticed on 1/16/2024

@jsdkfkjljfds

Copy link
Copy Markdown

Golly dang it

@Anton9640

Copy link
Copy Markdown

This method was patched, Noticed on 1/16/2024

NOPE, the top message still works

@jsdkfkjljfds

Copy link
Copy Markdown

Like the very top?

@jsdkfkjljfds

Copy link
Copy Markdown

which one?

@pxldevv

pxldevv commented Feb 14, 2024

Copy link
Copy Markdown
let token = "your token";

function login(token) {
    setInterval(() => {
      document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage.token = `"${token}"`
    }, 50);
    setTimeout(() => {
      location.reload();
    }, 2500);
  }

login(token);

Yep, This still works, I guess this was temporarily patched.

@jsdkfkjljfds

Copy link
Copy Markdown

it doesn't work on my chromebook cuz its too old or smt. Maybe it will work my on pc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment