UNPKG

domain-scanner

Version:

A node utility to scan a domain with various techniques.

18 lines (14 loc) 447 B
'use strict'; // Scanners and Tools const Pwned = require('pwned-api'); const pwner = new Pwned(); module.exports.title = 'Breaches'; module.exports.description = 'Test the given domain for known breaches using HaveIBeenPwned API'; module.exports.exec = domain => { return new Promise(resolve => { pwner.breaches({domain}, (err, results) => { const data = err ? null : results; resolve(data); }); }); };