Skip to content

Commit

Permalink
chore: add env to domains
Browse files Browse the repository at this point in the history
  • Loading branch information
rudemex committed May 18, 2022
1 parent 5d1f6ff commit f468185
Show file tree
Hide file tree
Showing 11 changed files with 659 additions and 163 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ on:
permissions:
contents: read

env:
TD_DOMAINS: ${{TD_DOMAINS}}

jobs:
build:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -23,7 +26,7 @@ jobs:

- name: test sslcheck
run: |
./sslcheck www.gorro.com.ar tienda.gorro.com.ar www.tresdoce.com.ar www.estudiofluk.com.ar apicedes.tresdoce.com.ar www.estudiohamaca.com.ar www.adipol.com.ar jenkins.tresdoce.com.ar static-pre.tresdoce.com.ar static.tresdoce.com.ar
./sslcheck ${TD_DOMAINS}
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

Expand Down
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

458 changes: 458 additions & 0 deletions .idea/dbnavigator.xml

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/sslcheck.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
The MIT License (MIT)

Copyright (c) 2020 Dan Brown

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The MIT License (MIT)
Copyright (c) 2020 Dan Brown
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
6 changes: 3 additions & 3 deletions email-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

## CONFIG
#############

# ./sslcheck www.gorro.com.ar tienda.gorro.com.ar www.tresdoce.com.ar www.estudiofluk.com.ar apicedes.tresdoce.com.ar www.estudiohamaca.com.ar www.adipol.com.ar jenkins.tresdoce.com.ar static-pre.tresdoce.com.ar static.tresdoce.com.ar
# Set the domains you want to check, Space separated.
DOMAINS="example.com google.com reddit.com"
DOMAINS="www.gorro.com.ar tienda.gorro.com.ar www.tresdoce.com.ar www.estudiofluk.com.ar apicedes.tresdoce.com.ar www.estudiohamaca.com.ar www.adipol.com.ar jenkins.tresdoce.com.ar static-pre.tresdoce.com.ar static.tresdoce.com.ar"

# Set the email address you want to send the results to
EMAIL="myemail@example.com"
EMAIL="mdelgado@tresdoce.com.ar"


## SCRIPT
Expand Down
66 changes: 33 additions & 33 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# sslcheck

A simple php script to check the expiry of SSL certificates.

<a href="https://asciinema.org/a/105703" target="_blank"><img src="https://asciinema.org/a/105703.png" width="480"/></a>

### Requirements

* PHP (Including CLI support).
* OpenSSL

This script has been tested only on Ubuntu 16.04+ using PHP7.

### Usage

1. Clone this repo or simply download the `sslcheck` file.
2. Ensure the `sslcheck` file is executable (`chmod a+x sslcheck`).
3. Execute the script `./sslcheck www.example.com`.

If you can't execute the script directly you may need to envoke the script via php (`php sslcheck www.example.com`);

You can check multiple domains by listing them all out when running the script:

```
sslcheck www.google.com www.example.com www.github.com
```

If a domain is found to have multiple A or AAAA records then each will be checked individually and the IP will be shown alongside the domain in the output.

#### Usage via Email

The file `email-example.sh` is a simple script showing how this can be used via email. Simply read the comments at the top of the script and change the configuration variables to set it up. If the `mail` command is not available on your system you may need to install it (ubuntu: `sudo apt-get install mailutils`). A good idea would be to set this up as a cron job to send a weekly report.

# sslcheck

A simple php script to check the expiry of SSL certificates.

<a href="https://asciinema.org/a/105703" target="_blank"><img src="https://asciinema.org/a/105703.png" width="480"/></a>

### Requirements

* PHP (Including CLI support).
* OpenSSL

This script has been tested only on Ubuntu 16.04+ using PHP7.

### Usage

1. Clone this repo or simply download the `sslcheck` file.
2. Ensure the `sslcheck` file is executable (`chmod a+x sslcheck`).
3. Execute the script `./sslcheck www.example.com`.

If you can't execute the script directly you may need to envoke the script via php (`php sslcheck www.example.com`);

You can check multiple domains by listing them all out when running the script:

```
sslcheck www.google.com www.example.com www.github.com
```

If a domain is found to have multiple A or AAAA records then each will be checked individually and the IP will be shown alongside the domain in the output.

#### Usage via Email

The file `email-example.sh` is a simple script showing how this can be used via email. Simply read the comments at the top of the script and change the configuration variables to set it up. If the `mail` command is not available on your system you may need to install it (ubuntu: `sudo apt-get install mailutils`). A good idea would be to set this up as a cron job to send a weekly report.

Loading

0 comments on commit f468185

Please sign in to comment.