From 3bc83dcbde2a6ba5541ae81b7c83ad494e2e06bb Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Mon, 8 Apr 2019 11:26:10 +0200 Subject: [PATCH] Add alternative file read and write to less --- _gtfobins/less.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/_gtfobins/less.md b/_gtfobins/less.md index 04de295..3d4ea2d 100644 --- a/_gtfobins/less.md +++ b/_gtfobins/less.md @@ -9,11 +9,19 @@ functions: v file-read: - code: less file_to_read + - description: This is useful when `less` is used as a pager by another binary to read a different file. + code: | + less /etc/profile + :e file_to_read file-write: - code: | echo DATA | less sfile_to_write q + - description: This invokes the default editor to edit the file. The file must exist. + code: | + less file_to_write + v sudo: - code: | sudo less /etc/profile