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 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)
Operating system: Ubuntu 20.04
Installation method / source: Kifarunix Guide