101 lines
2.6 KiB
JavaScript
101 lines
2.6 KiB
JavaScript
const puppeteer = require('puppeteer-extra');
|
|
const proxyChain = require('proxy-chain');
|
|
const { generateUsername } = require("unique-username-generator");
|
|
|
|
// const { hcaptcha } = require("puppeteer-hcaptcha");
|
|
|
|
const StealthPlugin = require('puppeteer-extra-plugin-stealth')
|
|
puppeteer.use(StealthPlugin())
|
|
|
|
// Set up the proxy server and port
|
|
const proxyURL = 'http://154.95.36.199:6893';
|
|
// const newProxyURL = proxyChain.anonymizeProxy(proxyURL)
|
|
|
|
|
|
function makeAccount() {
|
|
|
|
// Set up the Puppeteer browser launch options with the proxy configuration
|
|
puppeteer.launch({
|
|
headless: false,
|
|
args: [
|
|
'--disable-setuid-sandbox',
|
|
'--no-sandbox',
|
|
`--proxy-server=${proxyURL}`,
|
|
],
|
|
}).then(async browser => {
|
|
|
|
let user = generateUsername()
|
|
const userData = {
|
|
username: user,
|
|
email: `${user}@spam.omersabic.com`,
|
|
password: generatePassword(10)
|
|
}
|
|
|
|
|
|
// Use Puppeteer as you normally would
|
|
const page = await browser.newPage();
|
|
await page.authenticate({
|
|
username: 'qjuloybs',
|
|
password: 'o2axhmxniph5'
|
|
})
|
|
await page.goto('https://discord.com/register');
|
|
|
|
await page.waitForNetworkIdle();
|
|
|
|
await page.type('input[name="email"]', userData.email);
|
|
await page.type('input[name="username"]', userData.username);
|
|
await page.type('input[name="password"]', userData.password);
|
|
// DOB month
|
|
await delay(400);
|
|
await page.keyboard.press("Tab");
|
|
await page.keyboard.press("Space");
|
|
await page.keyboard.press("Enter");
|
|
|
|
// DOB day
|
|
await delay(400);
|
|
// await page.keyboard.press("Tab");
|
|
await page.keyboard.press("Space");
|
|
await page.keyboard.press("Enter");
|
|
|
|
// DOB year
|
|
await delay(400);
|
|
// await page.keyboard.press("Tab");
|
|
// await page.keyboard.press("Space")
|
|
await page.keyboard.type("1990");
|
|
await page.keyboard.press("Enter");
|
|
|
|
// TOS accept
|
|
await page.keyboard.press("Tab");
|
|
await page.keyboard.press("Space");
|
|
|
|
// await page.click('button[type=submit]')
|
|
|
|
// console.log(userData);
|
|
|
|
// await delay(4000);
|
|
// console.log('solving captcha');
|
|
|
|
// await delay(10000)
|
|
|
|
// let verifyEmail = await session.findEmailBySender('noreply@discordapp.com')
|
|
|
|
// console.log(verifyEmail);
|
|
})
|
|
}
|
|
|
|
function delay(time) {
|
|
return new Promise(function (resolve) {
|
|
setTimeout(resolve, time)
|
|
});
|
|
}
|
|
|
|
function generatePassword(length) {
|
|
const charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+~`|}{[]\:;?><,./-=';
|
|
let password = '';
|
|
for (let i = 0; i < length; i++) {
|
|
password += charset[Math.floor(Math.random() * charset.length)];
|
|
}
|
|
return password;
|
|
}
|
|
|
|
makeAccount() |