From 1a5b396744fc9d330a81eeddf5e25cab76fbca8b Mon Sep 17 00:00:00 2001 From: Roman Mueller Date: Fri, 2 Oct 2020 14:50:08 +0200 Subject: [PATCH] Add file read to git --- _gtfobins/git.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/_gtfobins/git.md b/_gtfobins/git.md index 6b0356a..89a64bb 100644 --- a/_gtfobins/git.md +++ b/_gtfobins/git.md @@ -13,6 +13,11 @@ functions: echo 'exec /bin/sh 0<&2 1>&2' >"$TF/.git/hooks/pre-commit.sample" mv "$TF/.git/hooks/pre-commit.sample" "$TF/.git/hooks/pre-commit" git -C "$TF" commit --allow-empty -m x + file-read: + - description: The read file content is displayed in `diff` style output format. + code: | + LFILE=file_to_read + git diff /dev/null $LFILE sudo: - 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.