crtsh
v0.1.4
Published
Query crt.sh from nodejs
Downloads
5
Maintainers
Readme
node-crtsh
Query Crtsh (crt.sh) from node.js.
Crtsh is a platform that permits you search for certificates that have been logged by CT. Many people use this to enumerate subdomains.
How to install
npm i crtsh
Usage
Getting all domain and subdomains certificate names
const { hostnames: crtshHostnames } = require('crtsh');
(async () => {
const hostnames = await crtshHostnames('%.example.org');
console.log(JSON.stringify(hostnames, null, 2);
// Will print:
// [
// "example.org",
// "www.example.org",
// "www.testdomain.example.org"
// ]
})();
More examples can be found at examples.
API
hostnames(pattern, [options])
pattern (string, required):
For example, if you want to list certificate names for "example.org" domain and subdomains, you can use "%.example.org".
options (object, optional):
axiosConfig: optional config to pass to axios.
proxy: optional proxy to use, eg: "localhost:8080"
For example, if you want to use proxy when calling crt.sh, you can use syntax like this:
const { hostnames } = require('crtsh'); await hostnames('%.example.org', { proxy: 'localhost:8080' });
Changelog
See CHANGELOG.md.
License
License under MIT License.