mpicard / pyvas

OpenVAS Management Protocol Client for Python
MIT License
23 stars 10 forks source link

download pdf report #26

Open aleita opened 5 years ago

aleita commented 5 years ago

Hi

I tried to download a report in pdf format I get a string.

with Client('10.1.100.1', username='User', password='password') as cli:
...   t = cli.download_report('114d74d8-55d6-4f9e-959b-529a5209f753', format_uuid='c402cc3e-b531-11e1-9163-406186ea4fc5')

 type(t)
<class 'str'>

what can I do with that string ?

thanks in advance

Ale

mrscasper commented 5 years ago

I think you're find that your PDF file is base 64 encoded, and you'll need to unpack that from the report and decode it into the file that you want.