@@ -67,6 +67,9 @@ def excluded_from_scan(self):
67
67
return six .next (six .itervalues (self .zap ._request (self .zap .base + 'ascan/view/excludedFromScan/' )))
68
68
69
69
def scanners (self , scanpolicyname = None , policyid = None ):
70
+ """
71
+ Gets the scanners, optionally, of the given scan policy and/or scanner policy/category ID.
72
+ """
70
73
params = {}
71
74
if scanpolicyname is not None :
72
75
params ['scanPolicyName' ] = scanpolicyname
@@ -159,6 +162,13 @@ def option_target_params_injectable(self):
159
162
def option_thread_per_host (self ):
160
163
return six .next (six .itervalues (self .zap ._request (self .zap .base + 'ascan/view/optionThreadPerHost/' )))
161
164
165
+ @property
166
+ def option_add_query_param (self ):
167
+ """
168
+ Tells whether or not the active scanner should add a query parameter to GET request that don't have parameters to start with.
169
+ """
170
+ return six .next (six .itervalues (self .zap ._request (self .zap .base + 'ascan/view/optionAddQueryParam/' )))
171
+
162
172
@property
163
173
def option_allow_attack_on_start (self ):
164
174
return six .next (six .itervalues (self .zap ._request (self .zap .base + 'ascan/view/optionAllowAttackOnStart/' )))
@@ -272,24 +282,36 @@ def exclude_from_scan(self, regex, apikey=''):
272
282
return six .next (six .itervalues (self .zap ._request (self .zap .base + 'ascan/action/excludeFromScan/' , {'regex' : regex , 'apikey' : apikey })))
273
283
274
284
def enable_all_scanners (self , scanpolicyname = None , apikey = '' ):
285
+ """
286
+ Enables all scanners of the scan policy with the given name, or the default if none given.
287
+ """
275
288
params = {'apikey' : apikey }
276
289
if scanpolicyname is not None :
277
290
params ['scanPolicyName' ] = scanpolicyname
278
291
return six .next (six .itervalues (self .zap ._request (self .zap .base + 'ascan/action/enableAllScanners/' , params )))
279
292
280
293
def disable_all_scanners (self , scanpolicyname = None , apikey = '' ):
294
+ """
295
+ Disables all scanners of the scan policy with the given name, or the default if none given.
296
+ """
281
297
params = {'apikey' : apikey }
282
298
if scanpolicyname is not None :
283
299
params ['scanPolicyName' ] = scanpolicyname
284
300
return six .next (six .itervalues (self .zap ._request (self .zap .base + 'ascan/action/disableAllScanners/' , params )))
285
301
286
302
def enable_scanners (self , ids , scanpolicyname = None , apikey = '' ):
303
+ """
304
+ Enables the scanners with the given IDs (comma separated list of IDs) of the scan policy with the given name, or the default if none given.
305
+ """
287
306
params = {'ids' : ids , 'apikey' : apikey }
288
307
if scanpolicyname is not None :
289
308
params ['scanPolicyName' ] = scanpolicyname
290
309
return six .next (six .itervalues (self .zap ._request (self .zap .base + 'ascan/action/enableScanners/' , params )))
291
310
292
311
def disable_scanners (self , ids , scanpolicyname = None , apikey = '' ):
312
+ """
313
+ Disables the scanners with the given IDs (comma separated list of IDs) of the scan policy with the given name, or the default if none given.
314
+ """
293
315
params = {'ids' : ids , 'apikey' : apikey }
294
316
if scanpolicyname is not None :
295
317
params ['scanPolicyName' ] = scanpolicyname
@@ -392,6 +414,12 @@ def set_option_attack_policy(self, string, apikey=''):
392
414
def set_option_default_policy (self , string , apikey = '' ):
393
415
return six .next (six .itervalues (self .zap ._request (self .zap .base + 'ascan/action/setOptionDefaultPolicy/' , {'String' : string , 'apikey' : apikey })))
394
416
417
+ def set_option_add_query_param (self , boolean , apikey = '' ):
418
+ """
419
+ Sets whether or not the active scanner should add a query param to GET requests which do not have parameters to start with.
420
+ """
421
+ return six .next (six .itervalues (self .zap ._request (self .zap .base + 'ascan/action/setOptionAddQueryParam/' , {'Boolean' : boolean , 'apikey' : apikey })))
422
+
395
423
def set_option_allow_attack_on_start (self , boolean , apikey = '' ):
396
424
return six .next (six .itervalues (self .zap ._request (self .zap .base + 'ascan/action/setOptionAllowAttackOnStart/' , {'Boolean' : boolean , 'apikey' : apikey })))
397
425
0 commit comments