Skip to content

UT-CTF/cptc-report-automation

Repository files navigation

CPTC Report Automation

Setup

  • Download and Install MiKTeX
  • Download and Install Python
  • Download and Install Perl (this might be preinstalled if you're not on windows)
    • If you don't want to install Perl, you can compile the report by running pdflatex multiple times but latexmk is simpler and has a nice clean command (also the python script/GUI will not work without Perl)
  • Use MiKTeX console/CLI to update LaTeX packages to latest versions
  • Create JSON data for vulnerabilities (one JSON per vulnerability - follow the format in examples)
  • Add images in images folder
  • Compile pdf by running python latex.py -c (adding the -h flag will show additional configuration options)

Manually editing Latex files

  • If you want to edit parts of the report other than the findings, each section is a separate file in the sections folder
    • The python script compiles all of the findings into sections/4_findings.tex
  • Add packages to the main.tex file NOT the section files
  • To compile the report without findings, you can simply create a blank 4_findings.tex file in the sections folder
  • The command to compile the report without the python script is latexmk -pdf main.tex
    • latexmk -c main.tex && latexmk -c -cd sections/*.tex to clean up extra files
    • This will not pull vuln information from the JSONs but will instead use the latex in sections/4_findings.tex

Using the GUI

  • Create a virtual environment: python -m venv venv
  • Activate the virtual environment: ./venv/Scripts/Activate.ps1 or source ./venv/bin/activate
  • Install required packages: pip install -r requirements.txt
  • Run the GUI: streamlit run ./gui.py or python -m streamlit run ./gui.py
  • Most of it is self explanatory but make sure to save to JSON before compiling PDF
  • If you need images, save images in the images folder and then use normal latex to access them
  • Note that the GUI will save vuln jsons in st-vuln-data instead of the default vuln_data folder

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published