-
Notifications
You must be signed in to change notification settings - Fork 0
/
attack.js
37 lines (35 loc) · 834 Bytes
/
attack.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var request = require('request'),
fs = require('fs'),
https =require('https');
//do{
for (var i = 0; i < 10000; i++) {
var options = {
host: '172.19.0.80',
port:'8002',
path: '/api/users/login',
cert: fs.readFileSync('./e1f8ce44-b098-4c92-940c-c52ca493e538.public.pem'),
key: fs.readFileSync('./e1f8ce44-b098-4c92-940c-c52ca493e538.private.pem'),
body:{
tipo:'Persona',
email:'adsad',
password:'123'
},
method:'POST',
json:true,
headers: {
accept: '*/*'
},
strictSSL: false
}
var req = https.request(options, function(res) {
console.log(res.statusCode);
res.on('data', function(d) {
process.stdout.write(d);
});
});
req.end();
req.on('error', function(e) {
console.error(e);
});
};
//}while(true)