I’ve been doing some tinkering with using OpenVAS from the CLI through the use of GVM-tools and gvm-script. Most of what I want seems to work but the creation of .pdf reports seems to be “broken”. I’ve used the provided script from the gvm-tools github page (and manuals) gvm-tools/scripts/pdf-report. But this leaves me with the error “Uncorrect padding”. To fix this i’ve used a “filler” to fix the numbers of “=” at the end of the file.
content += “=” * ((4 - len(content) % 4) % 4)
This allows me to be able to create the pdf, but when this has finished the actual pdf is broken (As in, the file is the correct size, but no pdf reader can open it). What I also notice is than when opening the pdf in a HEX editor i’m missing the file signature (25 50 44 46 2d) at the top of the document. (adding this manually does not fix the error)
Is anyone aware of this issue, am I the only one or does some1 know how I could fix this?