How to disable NVT family from a scan configuration via python-gvm

Dear all,

I am attempting to disable a whole NVT family from a scan configuration using python-gvm For example, let’s say my scan configuration contains some NVT families, like the following ones:

  • Brute force attacks
  • General
  • Web Servers
  • Windows

My goal is to disable the Brute force attacks family. Something like this, but programatically:

In order to do so, I am using the following code:

    families=[(family_name, False, False)],

where family_name is “Brute force attacks” and config_id is the appropriate scan configuration ID.

However, the scan configuration keeps the NVT family after the python code execution.

My question is: Is there a way to either:

  1. Disable a NVT family from a scan config?
  2. Disable a set of NVTs?

Thank you in advance for your answers.

Kind regards.

I found the solution.

It seems I was using the wrong python method. The following statement does the trick:

    family="Brute force attacks",

The previous statement removes NVT familyBrute force attacks” from scan_config <config_id>.

Kind regards.


Hi @victor.sanchez,

Very cool and thanks for sharing what worked!