Package org.zaproxy.clientapi.gen
Class Ascan
java.lang.Object
org.zaproxy.clientapi.gen.deprecated.AscanDeprecated
org.zaproxy.clientapi.gen.Ascan
This file was automatically generated.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExcludedParam
(String name, String type, String url) Adds a new parameter excluded from the scan, using the specified name.addScanPolicy
(String scanpolicyname, String alertthreshold, String attackstrength) Gets the IDs of the alerts raised during the scan with the given ID.Clears the regexes of URLs excluded from the active scans.disableAllScanners
(String scanpolicyname) Disables all scan rules of the scan policy with the given name, or the default if none given.disableScanners
(String ids, String scanpolicyname) Disables the scan rules with the given IDs (comma separated list of IDs) of the scan policy with the given name, or the default if none given.enableAllScanners
(String scanpolicyname) Enables all scan rules of the scan policy with the given name, or the default if none given.enableScanners
(String ids, String scanpolicyname) Enables the scan rules with the given IDs (comma separated list of IDs) of the scan policy with the given name, or the default if none given.Gets the regexes of URLs excluded from the active scans.Gets all the parameters that are excluded.Gets all the types of excluded parameters.excludeFromScan
(String regex) Adds a regex of URLs that should be excluded from the active scans.importScanPolicy
(String path) Imports a Scan Policy using the given file system path.messagesIds
(String scanid) Gets the IDs of the messages sent during the scan with the given ID.modifyExcludedParam
(String idx, String name, String type, String url) Modifies a parameter excluded from the scan.Tells whether or not the active scanner should add a query parameter to GET request that don't have parameters to start with.Deprecated.Option no longer in effective use.Tells whether or not the active scanner should encode cookie values.Deprecated.Tells whether or not the active scanner should inject the HTTP request header X-ZAP-Scan-ID, with the ID of the scan rule that's sending the requests.Gets the maximum number of alerts that a rule can raise before being skipped.Tells whether or not the HTTP Headers of all requests should be scanned.Tells whether or not the active scanner should scan null JSON values.Removes a parameter excluded from the scan, with the given index.removeScan
(String scanid) removeScanPolicy
(String scanpolicyname) scan
(String url, String recurse, String inscopeonly, String scanpolicyname, String method, String postdata) scan
(String url, String recurse, String inscopeonly, String scanpolicyname, String method, String postdata, Integer contextid) Runs the active scanner against the given URL or Context.scanAsUser
(String url, String contextid, String userid, String recurse, String scanpolicyname, String method, String postdata) Active Scans from the perspective of a User, obtained using the given Context ID and User ID.Gets the scan rules, optionally, of the given scan policy or scanner policy/category ID.scanProgress
(String scanid) scans()
setEnabledPolicies
(String ids, String scanpolicyname) setOptionAddQueryParam
(boolean bool) Sets whether or not the active scanner should add a query param to GET requests which do not have parameters to start with.setOptionAllowAttackOnStart
(boolean bool) setOptionAttackPolicy
(String string) setOptionDefaultPolicy
(String string) setOptionDelayInMs
(int i) Deprecated.Option no longer in effective use.setOptionEncodeCookieValues
(boolean bool) Sets whether or not the active scanner should encode cookie values.setOptionHandleAntiCSRFTokens
(boolean bool) setOptionHostPerScan
(int i) setOptionInjectPluginIdInHeader
(boolean bool) Sets whether or not the active scanner should inject the HTTP request header X-ZAP-Scan-ID, with the ID of the scan rule that's sending the requests.setOptionMaxAlertsPerRule
(int i) Sets the maximum number of alerts that a rule can raise before being skipped.setOptionMaxChartTimeInMins
(int i) setOptionMaxResultsToList
(int i) setOptionMaxScansInUI
(int i) setOptionPromptInAttackMode
(boolean bool) setOptionPromptToClearFinishedScans
(boolean bool) setOptionRescanInAttackMode
(boolean bool) setOptionScanHeadersAllRequests
(boolean bool) Sets whether or not the HTTP Headers of all requests should be scanned.setOptionScanNullJsonValues
(boolean bool) Sets whether or not the active scanner should scan null JSON values.setOptionShowAdvancedDialog
(boolean bool) setOptionThreadPerHost
(int i) setPolicyAlertThreshold
(String id, String alertthreshold, String scanpolicyname) setPolicyAttackStrength
(String id, String attackstrength, String scanpolicyname) setScannerAlertThreshold
(String id, String alertthreshold, String scanpolicyname) setScannerAttackStrength
(String id, String attackstrength, String scanpolicyname) skipScanner
(String scanid, String scannerid) Skips the scan rule using the given IDs of the scan and the scan rule.updateScanPolicy
(String scanpolicyname, String alertthreshold, String attackstrength) Methods inherited from class org.zaproxy.clientapi.gen.deprecated.AscanDeprecated
addScanPolicy, addScanPolicy, clearExcludedFromScan, disableAllScanners, disableScanners, enableAllScanners, enableScanners, excludeFromScan, pause, pauseAllScans, removeAllScans, removeScan, removeScanPolicy, resume, resumeAllScans, scan, scanAsUser, setEnabledPolicies, setOptionAllowAttackOnStart, setOptionAttackPolicy, setOptionDefaultPolicy, setOptionDelayInMs, setOptionHandleAntiCSRFTokens, setOptionHostPerScan, setOptionInjectPluginIdInHeader, setOptionMaxChartTimeInMins, setOptionMaxResultsToList, setOptionMaxScansInUI, setOptionPromptInAttackMode, setOptionPromptToClearFinishedScans, setOptionRescanInAttackMode, setOptionScanHeadersAllRequests, setOptionShowAdvancedDialog, setOptionTargetParamsEnabledRPC, setOptionTargetParamsInjectable, setOptionThreadPerHost, setPolicyAlertThreshold, setPolicyAttackStrength, setScannerAlertThreshold, setScannerAttackStrength, stop, stopAllScans
-
Constructor Details
-
Ascan
-
-
Method Details
-
status
- Throws:
ClientApiException
-
scanProgress
- Throws:
ClientApiException
-
messagesIds
Gets the IDs of the messages sent during the scan with the given ID. A message can be obtained with 'message' core view.- Throws:
ClientApiException
-
alertsIds
Gets the IDs of the alerts raised during the scan with the given ID. An alert can be obtained with 'alert' core view.- Throws:
ClientApiException
-
scans
- Throws:
ClientApiException
-
scanPolicyNames
- Throws:
ClientApiException
-
excludedFromScan
Gets the regexes of URLs excluded from the active scans.- Throws:
ClientApiException
-
scanners
Gets the scan rules, optionally, of the given scan policy or scanner policy/category ID.- Throws:
ClientApiException
-
policies
- Throws:
ClientApiException
-
attackModeQueue
- Throws:
ClientApiException
-
excludedParams
Gets all the parameters that are excluded. For each parameter the following are shown: the name, the URL, and the parameter type.- Throws:
ClientApiException
-
optionExcludedParamList
Deprecated.Use view excludedParams instead.- Throws:
ClientApiException
-
excludedParamTypes
Gets all the types of excluded parameters. For each type the following are shown: the ID and the name.- Throws:
ClientApiException
-
optionAttackPolicy
- Throws:
ClientApiException
-
optionDefaultPolicy
- Throws:
ClientApiException
-
optionDelayInMs
Deprecated.Option no longer in effective use.- Throws:
ClientApiException
-
optionHandleAntiCSRFTokens
- Throws:
ClientApiException
-
optionHostPerScan
- Throws:
ClientApiException
-
optionMaxAlertsPerRule
Gets the maximum number of alerts that a rule can raise before being skipped.- Throws:
ClientApiException
-
optionMaxChartTimeInMins
- Throws:
ClientApiException
-
optionMaxResultsToList
- Throws:
ClientApiException
-
optionMaxRuleDurationInMins
- Throws:
ClientApiException
-
optionMaxScanDurationInMins
- Throws:
ClientApiException
-
optionMaxScansInUI
- Throws:
ClientApiException
-
optionTargetParamsEnabledRPC
- Throws:
ClientApiException
-
optionTargetParamsInjectable
- Throws:
ClientApiException
-
optionThreadPerHost
- Throws:
ClientApiException
-
optionAddQueryParam
Tells whether or not the active scanner should add a query parameter to GET request that don't have parameters to start with.- Throws:
ClientApiException
-
optionAllowAttackOnStart
- Throws:
ClientApiException
-
optionEncodeCookieValues
Tells whether or not the active scanner should encode cookie values.- Throws:
ClientApiException
-
optionInjectPluginIdInHeader
Tells whether or not the active scanner should inject the HTTP request header X-ZAP-Scan-ID, with the ID of the scan rule that's sending the requests.- Throws:
ClientApiException
-
optionPromptInAttackMode
- Throws:
ClientApiException
-
optionPromptToClearFinishedScans
- Throws:
ClientApiException
-
optionRescanInAttackMode
- Throws:
ClientApiException
-
optionScanHeadersAllRequests
Tells whether or not the HTTP Headers of all requests should be scanned. Not just requests that send parameters, through the query or request body.- Throws:
ClientApiException
-
optionScanNullJsonValues
Tells whether or not the active scanner should scan null JSON values.- Throws:
ClientApiException
-
optionShowAdvancedDialog
- Throws:
ClientApiException
-
scan
public ApiResponse scan(String url, String recurse, String inscopeonly, String scanpolicyname, String method, String postdata) throws ClientApiException - Throws:
ClientApiException
-
scan
public ApiResponse scan(String url, String recurse, String inscopeonly, String scanpolicyname, String method, String postdata, Integer contextid) throws ClientApiException Runs the active scanner against the given URL or Context. Optionally, the 'recurse' parameter can be used to scan URLs under the given URL, the parameter 'inScopeOnly' can be used to constrain the scan to URLs that are in scope (ignored if a Context is specified), the parameter 'scanPolicyName' allows to specify the scan policy (if none is given it uses the default scan policy), the parameters 'method' and 'postData' allow to select a given request in conjunction with the given URL.- Throws:
ClientApiException
-
scanAsUser
public ApiResponse scanAsUser(String url, String contextid, String userid, String recurse, String scanpolicyname, String method, String postdata) throws ClientApiException Active Scans from the perspective of a User, obtained using the given Context ID and User ID. See 'scan' action for more details.- Throws:
ClientApiException
-
pause
- Throws:
ClientApiException
-
resume
- Throws:
ClientApiException
-
stop
- Throws:
ClientApiException
-
removeScan
- Throws:
ClientApiException
-
pauseAllScans
- Throws:
ClientApiException
-
resumeAllScans
- Throws:
ClientApiException
-
stopAllScans
- Throws:
ClientApiException
-
removeAllScans
- Throws:
ClientApiException
-
clearExcludedFromScan
Clears the regexes of URLs excluded from the active scans.- Throws:
ClientApiException
-
excludeFromScan
Adds a regex of URLs that should be excluded from the active scans.- Throws:
ClientApiException
-
enableAllScanners
Enables all scan rules of the scan policy with the given name, or the default if none given.- Throws:
ClientApiException
-
disableAllScanners
Disables all scan rules of the scan policy with the given name, or the default if none given.- Throws:
ClientApiException
-
enableScanners
Enables the scan rules with the given IDs (comma separated list of IDs) of the scan policy with the given name, or the default if none given.- Throws:
ClientApiException
-
disableScanners
Disables the scan rules with the given IDs (comma separated list of IDs) of the scan policy with the given name, or the default if none given.- Throws:
ClientApiException
-
setEnabledPolicies
- Throws:
ClientApiException
-
setPolicyAttackStrength
public ApiResponse setPolicyAttackStrength(String id, String attackstrength, String scanpolicyname) throws ClientApiException - Throws:
ClientApiException
-
setPolicyAlertThreshold
public ApiResponse setPolicyAlertThreshold(String id, String alertthreshold, String scanpolicyname) throws ClientApiException - Throws:
ClientApiException
-
setScannerAttackStrength
public ApiResponse setScannerAttackStrength(String id, String attackstrength, String scanpolicyname) throws ClientApiException - Throws:
ClientApiException
-
setScannerAlertThreshold
public ApiResponse setScannerAlertThreshold(String id, String alertthreshold, String scanpolicyname) throws ClientApiException - Throws:
ClientApiException
-
addScanPolicy
public ApiResponse addScanPolicy(String scanpolicyname, String alertthreshold, String attackstrength) throws ClientApiException - Throws:
ClientApiException
-
removeScanPolicy
- Throws:
ClientApiException
-
updateScanPolicy
public ApiResponse updateScanPolicy(String scanpolicyname, String alertthreshold, String attackstrength) throws ClientApiException - Throws:
ClientApiException
-
importScanPolicy
Imports a Scan Policy using the given file system path.- Throws:
ClientApiException
-
addExcludedParam
Adds a new parameter excluded from the scan, using the specified name. Optionally sets if the new entry applies to a specific URL (default, all URLs) and sets the ID of the type of the parameter (default, ID of any type). The type IDs can be obtained with the view excludedParamTypes.- Throws:
ClientApiException
-
modifyExcludedParam
public ApiResponse modifyExcludedParam(String idx, String name, String type, String url) throws ClientApiException Modifies a parameter excluded from the scan. Allows to modify the name, the URL and the type of parameter. The parameter is selected with its index, which can be obtained with the view excludedParams.- Throws:
ClientApiException
-
removeExcludedParam
Removes a parameter excluded from the scan, with the given index. The index can be obtained with the view excludedParams.- Throws:
ClientApiException
-
skipScanner
Skips the scan rule using the given IDs of the scan and the scan rule.- Throws:
ClientApiException
-
setOptionAttackPolicy
- Throws:
ClientApiException
-
setOptionDefaultPolicy
- Throws:
ClientApiException
-
setOptionAddQueryParam
Sets whether or not the active scanner should add a query param to GET requests which do not have parameters to start with.- Throws:
ClientApiException
-
setOptionAllowAttackOnStart
- Throws:
ClientApiException
-
setOptionDelayInMs
Deprecated.Option no longer in effective use.- Throws:
ClientApiException
-
setOptionEncodeCookieValues
Sets whether or not the active scanner should encode cookie values.- Throws:
ClientApiException
-
setOptionHandleAntiCSRFTokens
- Throws:
ClientApiException
-
setOptionHostPerScan
- Throws:
ClientApiException
-
setOptionInjectPluginIdInHeader
Sets whether or not the active scanner should inject the HTTP request header X-ZAP-Scan-ID, with the ID of the scan rule that's sending the requests.- Throws:
ClientApiException
-
setOptionMaxAlertsPerRule
Sets the maximum number of alerts that a rule can raise before being skipped.- Throws:
ClientApiException
-
setOptionMaxChartTimeInMins
- Throws:
ClientApiException
-
setOptionMaxResultsToList
- Throws:
ClientApiException
-
setOptionMaxRuleDurationInMins
- Throws:
ClientApiException
-
setOptionMaxScanDurationInMins
- Throws:
ClientApiException
-
setOptionMaxScansInUI
- Throws:
ClientApiException
-
setOptionPromptInAttackMode
- Throws:
ClientApiException
-
setOptionPromptToClearFinishedScans
- Throws:
ClientApiException
-
setOptionRescanInAttackMode
- Throws:
ClientApiException
-
setOptionScanHeadersAllRequests
Sets whether or not the HTTP Headers of all requests should be scanned. Not just requests that send parameters, through the query or request body.- Throws:
ClientApiException
-
setOptionScanNullJsonValues
Sets whether or not the active scanner should scan null JSON values.- Throws:
ClientApiException
-
setOptionShowAdvancedDialog
- Throws:
ClientApiException
-
setOptionTargetParamsEnabledRPC
- Throws:
ClientApiException
-
setOptionTargetParamsInjectable
- Throws:
ClientApiException
-
setOptionThreadPerHost
- Throws:
ClientApiException
-