New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

crtsh

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crtsh

Query crt.sh from nodejs

  • 0.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-crtsh

Version npm node.js version Module type: CJS js-semistandard-style Unit test status License

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.

Keywords

FAQs

Package last updated on 17 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc