Skip to content

Instantly share code, notes, and snippets.

Created March 27, 2015 07:47
Show Gist options
  • Save anonymous/8108fc253a922d365361 to your computer and use it in GitHub Desktop.
Save anonymous/8108fc253a922d365361 to your computer and use it in GitHub Desktop.
洗刷刷洗刷刷
var async = require("async");
var request = require("request");
var emailsp = ['qq.com','163.com','yahoo.com.cn','gmail.com','foxmail.com','tencent.com','sohu.com.cn','apple.com'];
var gen_account = function(sp_index){
sp_index = ~~(sp_index % emailsp.length);
var account;
if (sp_index == 0) { // @qq.com, use numbers only
account = Math.abs( ~~(9999999999 * Math.random()) ).toString();
} else {
account = (0xffffffffffffffff * Math.random()).toString(36);
}
return [account, emailsp[sp_index]].join('@');
};
var queue = async.queue(function(form, cb){
request.post('http://iphoneai.cn/apple/index2.asp',{form:form},function(err, resp, body){
console.log(form.accountname, body.length);
cb(err);
});
}, 64);
async.forever(function(cb){
var form = {
// Env:'PROD',
accountname: gen_account( emailsp.length * Math.random() ),
accountpassword: (0xffffffffffffffff * Math.random()).toString(36) ,
action:'save',
actionid:'ok',
appIdKey:'af1139274f266b22b68c2a3e7ad932cb3c0bbe854e13a79af78dcc73136882c3'
};
queue.push(form);
setTimeout(cb, 500);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment