crtsh-cli
v1.0.1
Published
## Overview
Readme
crtsh-cli
Overview
(crtsh-cli) is a very simple Node.js script that fetches data from crt.sh for a given domain. It extracts specific table data from the webpage, processes it, and either displays the results in the console or saves them to a specified output file.
Prerequisites
- Node.js (version 16 or higher)
- npm (Node Package Manager)
Installation
npm i -g crtsh-cliUsage
Command Line Options
--domain,-d: Specifies the domain to search for.--output,-o: (Optional) Specifies the output file to save the results.--help,-h: Displays the help message.
Examples
Displaying results in the console (helpful to pipe results):
crtsh -d example.comSaving results to a file:
crtsh -d example.com -o domains.txtDisplaying the help message:
crtsh --help
Development
Clone this repository or download the script.
git clone https://github.com/wiggercomputer/crtsh-cli cd crtsh-cliInstall the necessary dependencies.
npm i
Script Explanation
- Argument Parsing: The script uses the
arglibrary to parse command line arguments. - Fetching Data: It makes a GET request to
crt.shfor the specified domain usingaxios. - Data Extraction: The script uses
cheerioto load the HTML and extract the desired table data. - Output: The extracted data is either printed to the console or saved to a file, based on user input.
Dependencies
- axios: For making HTTP requests.
- cheerio: For parsing HTML and extracting data.
- arg: For parsing command line arguments.
License
This project is licensed under the MIT License.
Contributing
If you would like to contribute, please fork the repository and use a feature branch. Pull requests are welcome but I don't really expect any.
Issues
If you encounter any issues or have suggestions, please open an issue in this repository.
Feel free to reach out if you have any questions or need further assistance.
