public class Ascan extends AscanDeprecated
Modifier and Type | Method and Description |
---|---|
ApiResponse |
addExcludedParam(java.lang.String name,
java.lang.String type,
java.lang.String url)
Adds a new parameter excluded from the scan, using the specified name.
|
ApiResponse |
addScanPolicy(java.lang.String scanpolicyname) |
ApiResponse |
addScanPolicy(java.lang.String scanpolicyname,
java.lang.String alertthreshold,
java.lang.String attackstrength) |
ApiResponse |
alertsIds(java.lang.String scanid)
Gets the IDs of the alerts raised during the scan with the given ID.
|
ApiResponse |
attackModeQueue() |
ApiResponse |
clearExcludedFromScan()
Clears the regexes of URLs excluded from the active scans.
|
ApiResponse |
disableAllScanners(java.lang.String scanpolicyname)
Disables all scanners of the scan policy with the given name, or the default if none given.
|
ApiResponse |
disableScanners(java.lang.String ids,
java.lang.String scanpolicyname)
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.
|
ApiResponse |
enableAllScanners(java.lang.String scanpolicyname)
Enables all scanners of the scan policy with the given name, or the default if none given.
|
ApiResponse |
enableScanners(java.lang.String ids,
java.lang.String scanpolicyname)
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.
|
ApiResponse |
excludedFromScan()
Gets the regexes of URLs excluded from the active scans.
|
ApiResponse |
excludedParams()
Gets all the parameters that are excluded.
|
ApiResponse |
excludedParamTypes()
Gets all the types of excluded parameters.
|
ApiResponse |
excludeFromScan(java.lang.String regex)
Adds a regex of URLs that should be excluded from the active scans.
|
ApiResponse |
importScanPolicy(java.lang.String path)
Imports a Scan Policy using the given file system path.
|
ApiResponse |
messagesIds(java.lang.String scanid)
Gets the IDs of the messages sent during the scan with the given ID.
|
ApiResponse |
modifyExcludedParam(java.lang.String idx,
java.lang.String name,
java.lang.String type,
java.lang.String url)
Modifies a parameter excluded from the scan.
|
ApiResponse |
optionAddQueryParam()
Tells whether or not the active scanner should add a query parameter to GET request that
don't have parameters to start with.
|
ApiResponse |
optionAllowAttackOnStart() |
ApiResponse |
optionAttackPolicy() |
ApiResponse |
optionDefaultPolicy() |
ApiResponse |
optionDelayInMs() |
ApiResponse |
optionExcludedParamList()
Deprecated.
|
ApiResponse |
optionHandleAntiCSRFTokens() |
ApiResponse |
optionHostPerScan() |
ApiResponse |
optionInjectPluginIdInHeader()
Tells whether or not the active scanner should inject the HTTP request header X-ZAP-Scan-ID,
with the ID of the scanner that's sending the requests.
|
ApiResponse |
optionMaxChartTimeInMins() |
ApiResponse |
optionMaxResultsToList() |
ApiResponse |
optionMaxRuleDurationInMins() |
ApiResponse |
optionMaxScanDurationInMins() |
ApiResponse |
optionMaxScansInUI() |
ApiResponse |
optionPromptInAttackMode() |
ApiResponse |
optionPromptToClearFinishedScans() |
ApiResponse |
optionRescanInAttackMode() |
ApiResponse |
optionScanHeadersAllRequests()
Tells whether or not the HTTP Headers of all requests should be scanned.
|
ApiResponse |
optionShowAdvancedDialog() |
ApiResponse |
optionTargetParamsEnabledRPC() |
ApiResponse |
optionTargetParamsInjectable() |
ApiResponse |
optionThreadPerHost() |
ApiResponse |
pause(java.lang.String scanid) |
ApiResponse |
pauseAllScans() |
ApiResponse |
policies(java.lang.String scanpolicyname,
java.lang.String policyid) |
ApiResponse |
removeAllScans() |
ApiResponse |
removeExcludedParam(java.lang.String idx)
Removes a parameter excluded from the scan, with the given index.
|
ApiResponse |
removeScan(java.lang.String scanid) |
ApiResponse |
removeScanPolicy(java.lang.String scanpolicyname) |
ApiResponse |
resume(java.lang.String scanid) |
ApiResponse |
resumeAllScans() |
ApiResponse |
scan(java.lang.String url,
java.lang.String recurse,
java.lang.String inscopeonly,
java.lang.String scanpolicyname,
java.lang.String method,
java.lang.String postdata) |
ApiResponse |
scan(java.lang.String url,
java.lang.String recurse,
java.lang.String inscopeonly,
java.lang.String scanpolicyname,
java.lang.String method,
java.lang.String postdata,
java.lang.Integer contextid)
Runs the active scanner against the given URL and/or Context.
|
ApiResponse |
scanAsUser(java.lang.String url,
java.lang.String contextid,
java.lang.String userid,
java.lang.String recurse,
java.lang.String scanpolicyname,
java.lang.String method,
java.lang.String postdata)
Active Scans from the perspective of a User, obtained using the given Context ID and User ID.
|
ApiResponse |
scanners(java.lang.String scanpolicyname,
java.lang.String policyid)
Gets the scanners, optionally, of the given scan policy and/or scanner policy/category ID.
|
ApiResponse |
scanPolicyNames() |
ApiResponse |
scanProgress(java.lang.String scanid) |
ApiResponse |
scans() |
ApiResponse |
setEnabledPolicies(java.lang.String ids,
java.lang.String scanpolicyname) |
ApiResponse |
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.
|
ApiResponse |
setOptionAllowAttackOnStart(boolean bool) |
ApiResponse |
setOptionAttackPolicy(java.lang.String string) |
ApiResponse |
setOptionDefaultPolicy(java.lang.String string) |
ApiResponse |
setOptionDelayInMs(int i) |
ApiResponse |
setOptionHandleAntiCSRFTokens(boolean bool) |
ApiResponse |
setOptionHostPerScan(int i) |
ApiResponse |
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 scanner that's sending the requests.
|
ApiResponse |
setOptionMaxChartTimeInMins(int i) |
ApiResponse |
setOptionMaxResultsToList(int i) |
ApiResponse |
setOptionMaxRuleDurationInMins(int i) |
ApiResponse |
setOptionMaxScanDurationInMins(int i) |
ApiResponse |
setOptionMaxScansInUI(int i) |
ApiResponse |
setOptionPromptInAttackMode(boolean bool) |
ApiResponse |
setOptionPromptToClearFinishedScans(boolean bool) |
ApiResponse |
setOptionRescanInAttackMode(boolean bool) |
ApiResponse |
setOptionScanHeadersAllRequests(boolean bool)
Sets whether or not the HTTP Headers of all requests should be scanned.
|
ApiResponse |
setOptionShowAdvancedDialog(boolean bool) |
ApiResponse |
setOptionTargetParamsEnabledRPC(int i) |
ApiResponse |
setOptionTargetParamsInjectable(int i) |
ApiResponse |
setOptionThreadPerHost(int i) |
ApiResponse |
setPolicyAlertThreshold(java.lang.String id,
java.lang.String alertthreshold,
java.lang.String scanpolicyname) |
ApiResponse |
setPolicyAttackStrength(java.lang.String id,
java.lang.String attackstrength,
java.lang.String scanpolicyname) |
ApiResponse |
setScannerAlertThreshold(java.lang.String id,
java.lang.String alertthreshold,
java.lang.String scanpolicyname) |
ApiResponse |
setScannerAttackStrength(java.lang.String id,
java.lang.String attackstrength,
java.lang.String scanpolicyname) |
ApiResponse |
skipScanner(java.lang.String scanid,
java.lang.String scannerid)
Skips the scanner using the given IDs of the scan and the scanner.
|
ApiResponse |
status(java.lang.String scanid) |
ApiResponse |
stop(java.lang.String scanid) |
ApiResponse |
stopAllScans() |
ApiResponse |
updateScanPolicy(java.lang.String scanpolicyname,
java.lang.String alertthreshold,
java.lang.String attackstrength) |
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
public Ascan(ClientApi api)
public ApiResponse status(java.lang.String scanid) throws ClientApiException
ClientApiException
public ApiResponse scanProgress(java.lang.String scanid) throws ClientApiException
ClientApiException
public ApiResponse messagesIds(java.lang.String scanid) throws ClientApiException
ClientApiException
public ApiResponse alertsIds(java.lang.String scanid) throws ClientApiException
ClientApiException
public ApiResponse scans() throws ClientApiException
ClientApiException
public ApiResponse scanPolicyNames() throws ClientApiException
ClientApiException
public ApiResponse excludedFromScan() throws ClientApiException
ClientApiException
public ApiResponse scanners(java.lang.String scanpolicyname, java.lang.String policyid) throws ClientApiException
ClientApiException
public ApiResponse policies(java.lang.String scanpolicyname, java.lang.String policyid) throws ClientApiException
ClientApiException
public ApiResponse attackModeQueue() throws ClientApiException
ClientApiException
public ApiResponse excludedParams() throws ClientApiException
ClientApiException
@Deprecated public ApiResponse optionExcludedParamList() throws ClientApiException
ClientApiException
public ApiResponse excludedParamTypes() throws ClientApiException
ClientApiException
public ApiResponse optionAttackPolicy() throws ClientApiException
ClientApiException
public ApiResponse optionDefaultPolicy() throws ClientApiException
ClientApiException
public ApiResponse optionDelayInMs() throws ClientApiException
ClientApiException
public ApiResponse optionHandleAntiCSRFTokens() throws ClientApiException
ClientApiException
public ApiResponse optionHostPerScan() throws ClientApiException
ClientApiException
public ApiResponse optionMaxChartTimeInMins() throws ClientApiException
ClientApiException
public ApiResponse optionMaxResultsToList() throws ClientApiException
ClientApiException
public ApiResponse optionMaxRuleDurationInMins() throws ClientApiException
ClientApiException
public ApiResponse optionMaxScanDurationInMins() throws ClientApiException
ClientApiException
public ApiResponse optionMaxScansInUI() throws ClientApiException
ClientApiException
public ApiResponse optionTargetParamsEnabledRPC() throws ClientApiException
ClientApiException
public ApiResponse optionTargetParamsInjectable() throws ClientApiException
ClientApiException
public ApiResponse optionThreadPerHost() throws ClientApiException
ClientApiException
public ApiResponse optionAddQueryParam() throws ClientApiException
ClientApiException
public ApiResponse optionAllowAttackOnStart() throws ClientApiException
ClientApiException
public ApiResponse optionInjectPluginIdInHeader() throws ClientApiException
ClientApiException
public ApiResponse optionPromptInAttackMode() throws ClientApiException
ClientApiException
public ApiResponse optionPromptToClearFinishedScans() throws ClientApiException
ClientApiException
public ApiResponse optionRescanInAttackMode() throws ClientApiException
ClientApiException
public ApiResponse optionScanHeadersAllRequests() throws ClientApiException
ClientApiException
public ApiResponse optionShowAdvancedDialog() throws ClientApiException
ClientApiException
public ApiResponse scan(java.lang.String url, java.lang.String recurse, java.lang.String inscopeonly, java.lang.String scanpolicyname, java.lang.String method, java.lang.String postdata) throws ClientApiException
ClientApiException
public ApiResponse scan(java.lang.String url, java.lang.String recurse, java.lang.String inscopeonly, java.lang.String scanpolicyname, java.lang.String method, java.lang.String postdata, java.lang.Integer contextid) throws ClientApiException
ClientApiException
public ApiResponse scanAsUser(java.lang.String url, java.lang.String contextid, java.lang.String userid, java.lang.String recurse, java.lang.String scanpolicyname, java.lang.String method, java.lang.String postdata) throws ClientApiException
ClientApiException
public ApiResponse pause(java.lang.String scanid) throws ClientApiException
ClientApiException
public ApiResponse resume(java.lang.String scanid) throws ClientApiException
ClientApiException
public ApiResponse stop(java.lang.String scanid) throws ClientApiException
ClientApiException
public ApiResponse removeScan(java.lang.String scanid) throws ClientApiException
ClientApiException
public ApiResponse pauseAllScans() throws ClientApiException
ClientApiException
public ApiResponse resumeAllScans() throws ClientApiException
ClientApiException
public ApiResponse stopAllScans() throws ClientApiException
ClientApiException
public ApiResponse removeAllScans() throws ClientApiException
ClientApiException
public ApiResponse clearExcludedFromScan() throws ClientApiException
ClientApiException
public ApiResponse excludeFromScan(java.lang.String regex) throws ClientApiException
ClientApiException
public ApiResponse enableAllScanners(java.lang.String scanpolicyname) throws ClientApiException
ClientApiException
public ApiResponse disableAllScanners(java.lang.String scanpolicyname) throws ClientApiException
ClientApiException
public ApiResponse enableScanners(java.lang.String ids, java.lang.String scanpolicyname) throws ClientApiException
ClientApiException
public ApiResponse disableScanners(java.lang.String ids, java.lang.String scanpolicyname) throws ClientApiException
ClientApiException
public ApiResponse setEnabledPolicies(java.lang.String ids, java.lang.String scanpolicyname) throws ClientApiException
ClientApiException
public ApiResponse setPolicyAttackStrength(java.lang.String id, java.lang.String attackstrength, java.lang.String scanpolicyname) throws ClientApiException
ClientApiException
public ApiResponse setPolicyAlertThreshold(java.lang.String id, java.lang.String alertthreshold, java.lang.String scanpolicyname) throws ClientApiException
ClientApiException
public ApiResponse setScannerAttackStrength(java.lang.String id, java.lang.String attackstrength, java.lang.String scanpolicyname) throws ClientApiException
ClientApiException
public ApiResponse setScannerAlertThreshold(java.lang.String id, java.lang.String alertthreshold, java.lang.String scanpolicyname) throws ClientApiException
ClientApiException
public ApiResponse addScanPolicy(java.lang.String scanpolicyname) throws ClientApiException
ClientApiException
public ApiResponse addScanPolicy(java.lang.String scanpolicyname, java.lang.String alertthreshold, java.lang.String attackstrength) throws ClientApiException
ClientApiException
public ApiResponse removeScanPolicy(java.lang.String scanpolicyname) throws ClientApiException
ClientApiException
public ApiResponse updateScanPolicy(java.lang.String scanpolicyname, java.lang.String alertthreshold, java.lang.String attackstrength) throws ClientApiException
ClientApiException
public ApiResponse importScanPolicy(java.lang.String path) throws ClientApiException
ClientApiException
public ApiResponse addExcludedParam(java.lang.String name, java.lang.String type, java.lang.String url) throws ClientApiException
ClientApiException
public ApiResponse modifyExcludedParam(java.lang.String idx, java.lang.String name, java.lang.String type, java.lang.String url) throws ClientApiException
ClientApiException
public ApiResponse removeExcludedParam(java.lang.String idx) throws ClientApiException
ClientApiException
public ApiResponse skipScanner(java.lang.String scanid, java.lang.String scannerid) throws ClientApiException
ClientApiException
public ApiResponse setOptionAttackPolicy(java.lang.String string) throws ClientApiException
ClientApiException
public ApiResponse setOptionDefaultPolicy(java.lang.String string) throws ClientApiException
ClientApiException
public ApiResponse setOptionAddQueryParam(boolean bool) throws ClientApiException
ClientApiException
public ApiResponse setOptionAllowAttackOnStart(boolean bool) throws ClientApiException
ClientApiException
public ApiResponse setOptionDelayInMs(int i) throws ClientApiException
ClientApiException
public ApiResponse setOptionHandleAntiCSRFTokens(boolean bool) throws ClientApiException
ClientApiException
public ApiResponse setOptionHostPerScan(int i) throws ClientApiException
ClientApiException
public ApiResponse setOptionInjectPluginIdInHeader(boolean bool) throws ClientApiException
ClientApiException
public ApiResponse setOptionMaxChartTimeInMins(int i) throws ClientApiException
ClientApiException
public ApiResponse setOptionMaxResultsToList(int i) throws ClientApiException
ClientApiException
public ApiResponse setOptionMaxRuleDurationInMins(int i) throws ClientApiException
ClientApiException
public ApiResponse setOptionMaxScanDurationInMins(int i) throws ClientApiException
ClientApiException
public ApiResponse setOptionMaxScansInUI(int i) throws ClientApiException
ClientApiException
public ApiResponse setOptionPromptInAttackMode(boolean bool) throws ClientApiException
ClientApiException
public ApiResponse setOptionPromptToClearFinishedScans(boolean bool) throws ClientApiException
ClientApiException
public ApiResponse setOptionRescanInAttackMode(boolean bool) throws ClientApiException
ClientApiException
public ApiResponse setOptionScanHeadersAllRequests(boolean bool) throws ClientApiException
ClientApiException
public ApiResponse setOptionShowAdvancedDialog(boolean bool) throws ClientApiException
ClientApiException
public ApiResponse setOptionTargetParamsEnabledRPC(int i) throws ClientApiException
ClientApiException
public ApiResponse setOptionTargetParamsInjectable(int i) throws ClientApiException
ClientApiException
public ApiResponse setOptionThreadPerHost(int i) throws ClientApiException
ClientApiException