Skip to content

Commit bc2afaf

Browse files
authored
Fix: make scanner preferences visible (#1049)
* Add: make visible to clients two scanner preferences that were only available via openvas.conf configuration file * fix test
1 parent 594aa9f commit bc2afaf

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

ospd_openvas/daemon.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,29 @@
302302
+ 'packet was sent.'
303303
),
304304
},
305+
'icmp_retries': {
306+
'type': 'integer',
307+
'name': 'icmp_retries',
308+
'default': 1,
309+
'mandatory': 0,
310+
'visible_for_client': True,
311+
'description': (
312+
'This is the default amount of icmp packets that will be '
313+
+ 'sent to the host target during an alive test.'
314+
),
315+
},
316+
'icmp_grace_period': {
317+
'type': 'integer',
318+
'name': 'icmp_grace_period',
319+
'default': 0,
320+
'mandatory': 0,
321+
'visible_for_client': True,
322+
'description': (
323+
'Wait time between icmp packets during alive tests. '
324+
+ 'Useful for sensitive targets. It can slow '
325+
+ 'down the alive test.'
326+
),
327+
},
305328
'hosts_allow': {
306329
'type': 'string',
307330
'name': 'hosts_allow',

tests/test_daemon.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,29 @@
270270
+ 'packet was sent.'
271271
),
272272
},
273+
'icmp_retries': {
274+
'type': 'integer',
275+
'name': 'icmp_retries',
276+
'default': 1,
277+
'mandatory': 0,
278+
'visible_for_client': True,
279+
'description': (
280+
'This is the default amount of icmp packets that will be '
281+
+ 'sent to the host target during an alive test.'
282+
),
283+
},
284+
'icmp_grace_period': {
285+
'type': 'integer',
286+
'name': 'icmp_grace_period',
287+
'default': 0,
288+
'mandatory': 0,
289+
'visible_for_client': True,
290+
'description': (
291+
'Wait time between icmp packets during alive tests. '
292+
+ 'Useful for sensitive targets. It can slow '
293+
+ 'down the alive test.'
294+
),
295+
},
273296
'hosts_allow': {
274297
'type': 'string',
275298
'name': 'hosts_allow',

0 commit comments

Comments
 (0)