GithubHelp home page GithubHelp logo

diveyez / jsconsole-discordtokengrabber Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anonimato404/jsconsole-discordtokengrabber

0.0 0.0 0.0 3.21 MB

Grabbing Discord token using only JavaScript console.

License: MIT License

jsconsole-discordtokengrabber's Introduction

jsConsole-discordTokenGrabber

Getting Discord token with JavaScript console.

Who knows what you are going to do with this code.

Usage

  • Open Discord in any supported browsers(See below). And then paste the code into the JavaScript console(AKA inspect element console) after logging in.
  • Note: This code won't work in discord desktop app.

a

Readable version

function getToken() {
  // start a new tab/window under the same url
  let win = window.open();
  
  // check if the popup/new window opened successfully
  if(!win || !window.document) {
    return console.error('Unable to get token: popup blocked!');
  }
  
  // fooling localStorage trick
  window.dispatchEvent(new Event('beforeunload'));
  
  // log token
  console.log(win.localStorage.token);
  
  // clean up
  win.close();
};

getToken();

One-liner pasta for javascript console

(function(){let w=window.open();if(!w||!w.document)return console.error('Unable to get token: popup blocked!');window.dispatchEvent(new Event('beforeunload'));console.log(w.localStorage.token);w.close()}());

Tested browsers:

  • ✔️ Works with default browser settings
  • ❌ Doesn't work with default browser settings
  • ❔ Will ask user to enable/allow popup window
Browsers Supported
Chrome ✔️
Safari
Firefox
Edge ✔️
Brave ✔️

jsconsole-discordtokengrabber's People

Contributors

tkperson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.