-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwolo.js
33 lines (28 loc) · 903 Bytes
/
wolo.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
const request = require('request');
request('https://haveibeenpwned.com/api/v2/breachedaccount/omerf@gmail.com', { json: true, headers: {
'User-Agent': 'request'
} }, (err, res, body) => {
if (err) { return console.log(err); }
//console.dir(body[0].Title);
return body;
//console.log(body.explanation);
});
// var req = require('request');
// URL = "https://haveibeenpwned.com/api/v2/breachedaccount/omerf@gmail.com";
// var options = {
// host: 'haveibeenpwned.com',
// port: 443,
// path: '',
// method: 'GET',
// headers: {
// 'Content-Type': 'application/json'
// }
// };
// req.get(URL, options,function (error, response, body) {
// if (!error && response.statusCode == 200) {
// var info = JSON.parse(body)
// console.log(info);
// }else{
// console.log("err:"+error);
// }
// });