Hello, I have noticed that when I attempt to export NVTs from Secinfo with a filter on, an xml file with the NVTs without the filter is exported. Is there a way to export NVTs with the filter on through the GSA? I have also tried to use a python script to do this with no success. The following script exports a file not in a normal xml format.
import requests
def main(gmp, args):
if len(args.argv) <= 1:
print('Please provide a XML file name as script arguments')
return 1
filename = args.argv[1]
response = gmp.get_info_list(gmp.types.InfoType.NVT, filter_id='c366e11e-29ae-4c52-a181-87de94c53d1b', details=False)
content = "".join(response.itertext())
with open(filename, 'wb') as file:
file.write(content.encode())
print('Done.')
if __name__ == '__gmp__':
main(gmp, args)
GVM versions
gsa: 9.0.1~git-f4a4658fb-gsa-9.0
gvm: 9.0.1~git-5a976c58-gvmd-9.0
openvas-scanner: 7.01
gvm-libs: 11.01
Environment
Operating system: Ubuntu 20.04
Installation method / source: Kifarunix Guide