From ea9dd24d595eb543c74fb02d7c4d0a66ea736dfe Mon Sep 17 00:00:00 2001 From: Emanuel Duss Date: Thu, 12 Nov 2020 14:21:00 +0100 Subject: [PATCH] New command: check_log --- _gtfobins/check_log.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 _gtfobins/check_log.md diff --git a/_gtfobins/check_log.md b/_gtfobins/check_log.md new file mode 100644 index 0000000..f869ad4 --- /dev/null +++ b/_gtfobins/check_log.md @@ -0,0 +1,30 @@ +--- +description: | + This is the `check_log` Nagios plugin, available e.g. in `/usr/lib/nagios/plugins/`. +functions: + file-read: + - code: | + LFILE=file_to_read + OUTPUT=output_file + umask 022 + check_log -F "$LFILE" -O "$OUTPUT" + cat "$OUTPUT" + file-write: + - code: | + LFILE=file_to_write + INPUT=output_file + umask 022 + check_log -F "$INPUT" -O "$LFILE" + suid: + - code: | + LFILE=file_to_write + INPUT=output_file + umask 022 + ./check_log -F "$INPUT" -O "$LFILE" + sudo: + - code: | + LFILE=file_to_write + INPUT=output_file + umask 022 + sudo check_log -F "$INPUT" -O "$LFILE" +---