node-crtsh
![License](https://img.shields.io/github/license/kucingbasah737/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);
})();
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.