Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const chalk = require('chalk');
- const request = require('request');
- const crypto = require('crypto');
- const fs = require('fs');
- const namesFile = fs.readFileSync("names.json");
- const names = JSON.parse(namesFile);
- let targetsFile = fs.readFileSync("targets.json");
- let targets = JSON.parse(targetsFile);
- fs.watchFile('targets.json', (curr, prev) => {
- targetsFile = fs.readFileSync("targets.json");
- targets = JSON.parse(targetsFile);
- console.log(` `);
- console.log(chalk`{green Updated targets!}`);
- });
- function doIt() {
- console.log(` `);
- targets.forEach((target, index) => {
- let randName = names[Math.floor(Math.random() * names.length)].toLowerCase() + Math.floor(Math.random() * 90 + 10);
- let randPassword = crypto.randomBytes(Math.floor(Math.random() * 8 + 3)).toString("hex");
- let formData = {
- [target.loginField]: randName,
- [target.passwordField]: randPassword,
- };
- for(let [key, value] of Object.entries(target.extraFormData)) {
- formData[key] = value;
- }
- setTimeout(() => {
- request.post(target.url, {
- formData: formData,
- followRedirect: false,
- timeout: 1500
- }, (err, res, body) => {
- if (err) {
- console.log(chalk`{red [Error]} ${target.url} failed [${err}]`);
- }
- else {
- if (res.statusCode == 200)
- console.log(chalk`{green [200]} Sent {yellow ${randName}} with {yellow ${randPassword}} [${target.url}]`);
- else
- console.log(chalk`{red [${res.statusCode}]} Failed [${target.url}]`);
- }
- });
- }, 200 * index);
- });
- setTimeout(doIt, Math.floor(Math.random() * 15000 + 2000));
- }
- doIt();
Advertisement
Add Comment
Please, Sign In to add comment