Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thescriptguy/download-certificates
A multithreaded program to download the certificates from entries in a file.
https://github.com/thescriptguy/download-certificates
Last synced: 2 days ago
JSON representation
A multithreaded program to download the certificates from entries in a file.
- Host: GitHub
- URL: https://github.com/thescriptguy/download-certificates
- Owner: TheScriptGuy
- License: other
- Created: 2024-07-03T04:03:28.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-06T05:03:55.000Z (4 months ago)
- Last Synced: 2024-07-07T05:53:24.145Z (4 months ago)
- Language: C
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ๐ SSL Certificate Downloader
A multi-threaded SSL certificate downloader that allows you to retrieve and save SSL certificates from multiple hosts.
## ๐ Table of Contents
- [Features](#features)
- [Requirements](#requirements)
- [Required Libraries](#required-libraries)
- [Compilation](#compilation)
- [Usage](#usage)
- [Arguments](#arguments)
- [Examples](#examples)
- [Contributing](#contributing)
- [License](#license)- ๐ Multi-threaded certificate downloading
- ๐พ Save certificates with SHA256 hash filenames
- โฑ๏ธ Configurable connection timeout
- ๐ Optional overwrite of existing certificates
- ๐ฐ๏ธ Customizable delay between requests- GCC compiler
- OpenSSL development libraries
- POSIX-compliant systemBefore compiling, ensure you have the following libraries installed on your system:
- ๐ OpenSSL: For SSL/TLS support
- ๐งต pthreads: For multi-threading capabilitiesThese libraries are typically available in most standard development environments. If you encounter any issues during compilation, make sure these libraries and their development files are properly installed on your system.
1. Clone the repository:
```
git clone https://github.com/TheScriptGuy/certificate-downloader.git
cd ssl-certificate-downloader
```2. Compile the program:
Make options
```
$ make help
Available targets:
all : Build the default target (download_cert)
full : Build with all libraries statically linked
clean : Remove all built and intermediate files
help : Display this help messageCompiler flags:
CFLAGS : -Wall -Wextra -Iinclude -pthread
LDFLAGS : -lssl -lcryptoTo use a specific compiler, set CC. For example:
make CC=clangTo add extra CFLAGS or LDFLAGS, use '+=' For example:
make CFLAGS+=-DDEBUG LDFLAGS+=-L/usr/local/lib
```To build the binary with the libraries `dynamically` linked, use:
```
make all
```To build the binary with the libraries `statically` linked, use:
```
make full
```This will create an executable named `download_cert`.
Basic usage:
```
./download_cert -if -od [OPTIONS]
```| Argument | Description | Required |
|----------|-------------|----------|
| `-if ` | Input file containing hostnames and ports | โ Yes |
| `-od ` | Directory to save downloaded certificates | โ Yes |
| `-delay ` | Delay between each worker's request (default: 0) | โ No |
| `-workers ` | Number of worker threads (default: 1) | โ No |
| `-timeout ` | Connection timeout in seconds (default: 3) | โ No |
| `-overwrite` | Allow overwriting of existing certificate files | โ No |1. Basic usage with default settings:
```
./download_cert -if hosts.txt -od /path/to/certs
```2. Use 5 worker threads with a 2-second delay between requests:
```
./download_cert -if hosts.txt -od /path/to/certs -workers 5 -delay 2
```3. Set a 10-second connection timeout and allow overwriting:
```
./download_cert -if hosts.txt -od /path/to/certs -timeout 10 -overwrite
```4. Combine multiple options:
```
./download_cert -if hosts.txt -od /path/to/certs -workers 3 -delay 1 -timeout 5 -overwrite
```Contributions are welcome! Please feel free to submit a Pull Request.
This project/software is licensed for Personal Use only - see the [LICENSE](https://github.com/TheScriptGuy/download-certificates/blob/main/LICENSE.md) file for details.