https://github.com/bkstar123/cloudflare_helper_scripts
Helper scripts for SSL & Cloudflare custom SSL management
https://github.com/bkstar123/cloudflare_helper_scripts
cloudflare ssl tls
Last synced: 9 days ago
JSON representation
Helper scripts for SSL & Cloudflare custom SSL management
- Host: GitHub
- URL: https://github.com/bkstar123/cloudflare_helper_scripts
- Owner: bkstar123
- Created: 2019-08-22T09:39:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-22T10:17:00.000Z (over 1 year ago)
- Last Synced: 2025-06-06T03:05:59.008Z (9 months ago)
- Topics: cloudflare, ssl, tls
- Language: PHP
- Homepage:
- Size: 118 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cloudflare Helper Scripts
This repository provides some helper scripts to interact with Cloudflare API. At this time of writing, it offers the following capabilities:
– Fetch the current custom SSL configuration for a list of given zones & save the output to a csv file for easier importing to Excel.
– Upload/Replace a custom certificate for a list of given zones.
– Fetch certificate data from the list of given URL (may/maynot on Cloudflare): certificate fingerprint, expire date, days until expiration, DNS A & CNAME record and so on. The output will be saved to a csv file for easier importing to Excel.
– Quickly decode a certificate file and print the output to the standard output (stdout).
– Filter all unique root/apex domains from a list of given custom domains
## Usage
### Installation
- Firstly, download the repository to your local machine and run ```composer install``` to install all the dependent packages.
- Rename ```.env.example``` to ```.env```, put your Cloudflare API key to ```.env``` , rename ```6.cffirewall_rule_params.php.example``` to ```6.cffirewall_rule_params.php```, and create all necessary files in the ***input*** directory (naming them after the ones you specify in the ```.env```)
### Execution
```bash
# You should make sure that all necessary data are already put in the respective input files
php 1.cfCheckZoneCustomSSL.php
php 1.cfUploadSSLCert.php
php 3.checkSSLFromCertFile.php
php 4.checkSSLFromURL.php
php 5.filterApexRootDomain.php
php 6.cfFirewallRuleCreate.php
```