Created
May 8, 2019 15:11
-
-
Save wallopthecat/473b5e07e2270b6f040e57f50a603e09 to your computer and use it in GitHub Desktop.
Discord token scraper (gists)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require("node-fetch"); | |
const regex = /[MN][A-Za-z\d]{23}\.[\w-]{6}\.[\w-]{27}/g; | |
fetch("https://api.github.com/gists") | |
.then(r => r.json()) | |
.then(r => { | |
for (const gist of r) { | |
fetch(gist.files[Object.keys(gist.files)[0]].raw_url) | |
.then(rr => rr.text()) | |
.then(rr => { | |
for (const match of (rr.match(regex) || [])) { | |
console.log(match); | |
} | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment