This repository contains the requirements, templates and the script to convert a markdown pentest or OSCP report into a PDF file that can be sent directly to the client or to Offensive Security. Furthermore, I have added two title pages, configurable on the markdown file, so you can choose the best title page that adapts to your needs.
Before executing the generate.sh
your Kali Linux machine needs some packages that are not installed by default. In order to obtain them, execute the script requirements.sh
.
It might be the case where you execute a long string, or you have a long output from a command that doesn't contain any spaces. In those cases, pandoc doesn't know where to split de line, so it keeps a huge line that exists in the PDF. To avoid this problem, the number of characters per line must not exceed 95. Hence, after 95 characters without space, you need to put a space.
Since Pandoc renders images at page width by default, some images come out really big, depending on the aspect ratio of the original image. This could be solved by using something like ![<CAPTION>](<IMAGE_PATH>){ width=250px height=100px}
in your original MarkDown file.
The \leavevmode
and \newline
are necessary because Pandoc from h5 onwards puts both the header and the following text on the same line.
##### H5
\leavevmode \newline
If you want your inline code to have syntax highlighting, which I don't encourage, you must write it like so.
`print("HELLO")`{.bash}
In this template, if you want to immediately start writing on a new page, you need to write \newpage
.
Instead of simply writting \
, write \textbackslash
.
In the section you want to referenciate, after the title section write \label{<SECTION_NAME>}
. Then, to referenciate the section write \ref{<SECTION_NAME>} \nameref{<SECTION_NAME>}
If you have any doubt about the parameters at the top of the Markdown files, go to the Eisvogel latex template repository.
In order to generate your PDF file, just do the following.
./generate.sh <INPUT MAKRDOWN PATH> <OUTPUT PDF FILE>
If the compilation has been successful, the PDF file will open.
- Add a frame to only images in the report. This solution puts a frame on every single image, so it the images on the title page will also have a frame.
- Insert everything into a docker container