esm2markdown/README.md

47 lines
1.3 KiB
Markdown
Raw Normal View History

2018-03-15 12:40:16 -04:00
# esm2markdown
2018-03-15 12:50:41 -04:00
This python script is intended to be used to automatically generate use case / correlation rule documentation in Markdown format for the McAfee Enterprise Sceurity Manager (ESM). It accepts a XML file that has been exported from the correlation rule editor of the ESM, converts its contents to Markdown format and writes it into a new file. If you need any other format, you might want to use pandoc to convert to e.g. pdf, docx or HTML.
2018-03-16 05:32:21 -04:00
## Requirements
2018-03-21 18:07:53 -04:00
This tool requires the following:
* Python 3
2018-03-22 15:11:43 -04:00
* lxml (XML parser that understands CDATA)
* networkx (needed for creating graphs)
* pydot (needed for creating graphs)
* pandoc (for converting to other formats than Markdown)
2018-03-21 18:07:53 -04:00
On Debian you can install the dependencies with "sudo apt-get install python3-lxml python3-networkxi python3-pydot"
2018-03-16 05:32:21 -04:00
2018-03-15 12:50:41 -04:00
## Usage
2018-03-22 15:11:43 -04:00
Please configure esm2markdown.ini to your liking and execute esm2markdown.py like this:
2018-03-15 12:50:41 -04:00
```
2018-03-22 15:11:43 -04:00
# python esm2markdown.py <rule xml file> <markdown output file>
2018-03-15 12:50:41 -04:00
```
## Example
2018-03-22 15:11:43 -04:00
### Convert xml to Markdown
2018-03-15 12:50:41 -04:00
```
2018-03-22 15:11:43 -04:00
# python esm2markdown demo.xml demo.mk
2018-03-15 12:50:41 -04:00
```
2018-03-22 10:48:39 -04:00
2018-03-22 15:11:43 -04:00
### Convert to Markdown to DOCX
```
# pandoc -s demo.mk -o demo.docx
```
In the end, the result should look like this shortened output:
2018-03-22 10:48:39 -04:00
![screenshot](demo/demo.png "")
2018-03-22 15:13:59 -04:00
2018-03-22 15:13:37 -04:00
[...]
2018-03-23 03:30:34 -04:00
For a complete view of the result, please download the PDF file: [demo.pdf](demo/demo.pdf)