UNPKG

domain-scanner

Version:

A node utility to scan a domain with various techniques.

21 lines (17 loc) 544 B
'use strict'; const ssllabs = require('node-ssllabs'); module.exports.title = 'Certificate Test'; module.exports.description = 'Run the complete SSL/TLS server testing using SSL Labs API'; module.exports.exec = (domain, options) => { return new Promise(resolve => { let opts = Object.assign(options.certificate || {}, { host: domain }); ssllabs.scan(opts, (err, results) => { if (err || results.status === 'ERROR') { return resolve(null); } resolve(results); }); }); };