Set script preference via OSPD XML

Hi,

I’m trying to start a scan via OSPD and sending the XML myself.

I want to set the preference for 1.3.6.1.4.1.25623.1.0.103697 (gb_default_credentials_options.nasl).
The NASL script contains the following line:
script_add_preference(name:"Disable brute force checks", type:"checkbox", value:"no", id:3);

What would be the correct XML for this?

I’ve tried:

<vt_single id="1.3.6.1.4.1.25623.1.0.103697">
	<vt_value id="3">yes</vt_value>
</vt_single>

and:

<vt_single id="1.3.6.1.4.1.25623.1.0.103697">
	<vt_value id="Disable brute force checks">yes</vt_value>
</vt_single>

But none of them seem to work. Could someone advise me, please?
Thanks in advance!

I’ve verified default_credentials/disable_brute_force_checks key is not present in Redis.

What about name="Disable brute force checks" ? :thinking:

1 Like

I’ve found the problem.
I was overwriting the previous settings.

The correct structure which works:

<vt_single id="1.3.6.1.4.1.25623.1.0.103697">
	<vt_value id="1"></vt_value>
	<vt_value id="2">1</vt_value>
	<vt_value id="3">1</vt_value>
	<vt_value id="4">1</vt_value>
</vt_single>
1 Like