forked from discord-services/token-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
63 lines (53 loc) · 1.95 KB
/
index.js
File metadata and controls
63 lines (53 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
const proxyChecker = require('proxy-checker');
const { scrapeProxies } = require('./util/scraper.js');
var anticaptcha = require('./anticaptcha')('tokenhere'); //<<< your anticaptcha token
var fs = require('fs');
var proxies = [];
anticaptcha.setWebsiteURL("https://discord.com/register");
anticaptcha.setWebsiteKey("6Lef5iQTAAAAAKeIvIY-DeexoO3gj7ryl9rLMEnn");
anticaptcha.setUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36");
anticaptcha.getBalance(function (err, balance) {
if (err) {
console.error(err);
return;
}
if (balance > 0) {
anticaptcha.createTaskProxyless(function (err, taskId) {
if (err) {
console.error(err);
return;
}
console.log(taskId);
anticaptcha.getTaskSolution(taskId, function (err, taskSolution) {
if (err) {
console.error(err);
return;
}
console.log(taskSolution);
fs.writeFile('1234.txt', taskSolution, function(err) {
});
});
});
}
//snig
scrapeProxies.then(fetched => {
fs.writeFile('util/proxies.txt', fetched, (err) => {
if (err) throw err;
proxyChecker.checkProxiesFromFile('Source/proxies.txt', {
url: 'https://discord.com',
regex: /It's time to ditch Skype and TeamSpeak./
}, (host, port, ok, statusCode, err) => {
if (ok) proxies.push(`${host}:${port}`);
});
});
console.log(`Checking ${fetched.length} proxies!`);
}).catch(err => {
proxyChecker.checkProxiesFromFile('util/proxies.txt', {
url: 'https://discord.com',
regex: /It's time to ditch Skype and TeamSpeak./
}, (host, port, ok, statusCode, err) => {
if (ok) proxies.push(`${host}:${port}`);
});
console.log(`Checking proxies from proxies.txt!`);
});
});