### ----------------------------------------------------
### -- Zap
### -- Licenses: Artistic-2.0
### -- Authors: Khalid Elboray
### -- File: README.md
### ----------------------------------------------------
### -- Chunk 1 of 3
[OWASP ZAP API](https://www.zaproxy.org/docs/api/) Raku module
==============================================================

SYNOPSIS
========

## `Zap`

```perl6
use lib 'lib';
use Zap;
# Config Zap Client
ZapConfig(:apikey<apikey12345>,:port<8081>,:addr<127.0.0.1>);
# send a url to the spider
my $scanId = Zap::Spider.scan(:url<https://perl.org>);
# get the spider status
my $status = Zap::Spider.status(:$scanId);
# wait for the spider to finish then get the result
$*OUT = $*OUT.open(:!buffer);
while Zap::Spider.status(:$scanId) < 100 {
    print "Spider progress {Zap::Spider.status(:$scanId)}  \r";
}
$*OUT = $*OUT.open(:buffer);
put "URL : $_" for Zap::Spider.results(:$scanId);
my @scans = Zap::Spider.scans; # this needs some work
put "ID , Progress , State";
for @scans -> %scan {
    put %scan<id progress state>.fmt("%s",', ')
}

```
Installation
============

`zef install Zap`

TODO
====

* Make the code and API Response more easy to handle
* Write a Script to provide a CLI `raku-zap` maybe ?
* Write an Interface for the zap CLI 
* Automate Spider and Scanners 
* Since we are using Cro::HTTP::Client , we can handel the other response formats with `body-parsers` (a `Cro::HTTP::BodyParser` class)


Bad Generated Docs (needs more work)
================== 

class Zap::Ruleconfig
---------------------

class `Zap::Ruleconfig` Methods

### method resetAllRuleConfigValues

```perl6
method resetAllRuleConfigValues() returns Mu
```

Reset all of the rule configurations

### method resetRuleConfigValue

```perl6
method resetRuleConfigValue(
    :$key!
) returns Mu
```

Reset the specified rule configuration, which must already exist

### method setRuleConfigValue

```perl6
method setRuleConfigValue(
    :$key!,
    :$value
) returns Mu
```

Set the specified rule configuration, which must already exist

class Zap::Break
----------------

class `Zap::Break` Methods

### method isBreakRequest

```perl6
method isBreakRequest() returns Mu
```

Returns True if ZAP will break on requests

### method isBreakResponse

```perl6
method isBreakResponse() returns Mu
```

Returns True if ZAP will break on responses

### method waitForHttpBreak

```perl6
method waitForHttpBreak(
    :$poll,
    :$keepalive
) returns Mu
```

Waits until an HTTP breakpoint has been hit, at which point it returns the message. Poll is the number of milliseconds ZAP will pause between checking for breakpoints being hit (default 500). If keepalive is zero or less then the response will be returned as a Server Sent Event, otherwise it is used as the frequency in seconds at which 'keepalive' events should be returned and the response is sent as a standard response.

### method addHttpBreakpoint

```perl6
method addHttpBreakpoint(
    :$string!,
    :$location!,
    :$match!,
    :$inverse!,
    :$ignorecase!
) returns Mu
```

Adds a custom HTTP breakpoint. The string is the string to match. Location may be one of: url, request_header, request_body, response_header or response_body. Match may be: contains or regex. Inverse (match) may be true or false. Lastly, ignorecase (when matching the string) may be true or false.

### method break

```perl6
method break(
    :$type!,
    :$state!,
    :$scope
) returns Mu
```

Controls the global break functionality. The type may be one of: http-all, http-request or http-response. The state may be true (for turning break on for the specified type) or false (for turning break off). Scope is not currently used.

### method continue

```perl6
method continue() returns Mu
```

Submits the currently intercepted message and unsets the global request/response breakpoints

### method drop

```perl6
method drop() returns Mu
```

Drops the currently intercepted message

### method removeHttpBreakpoint

```perl6
method removeHttpBreakpoint(
    :$string!,
    :$location!,
    :$match!,
    :$inverse!,
    :$ignorecase!
) returns Mu
```

Removes the specified breakpoint

### method setHttpMessage

```perl6
method setHttpMessage(
    :$httpHeader!,
    :$httpBody
) returns Mu
```

Overwrites the currently intercepted message with the data provided

### method step

```perl6
method step() returns Mu
```

Submits the currently intercepted message, the next request or response will automatically be intercepted

class Zap::Hud
--------------

class `Zap::Hud` Methods

### method hudAlertData

```perl6
method hudAlertData(
    :$url!
) returns Mu
```

Returns the alert summary needed by the HUD for the specified URL

### method optionAllowUnsafeEval

```perl6
method optionAllowUnsafeEval() returns Mu
```

Returns true if the 'Allow unsafe-eval' option is set

### method optionBaseDirectory

```perl6
method optionBaseDirectory() returns Mu
```

Returns the base directory from which the HUD files are loaded

### method optionDevelopmentMode

```perl6
method optionDevelopmentMode() returns Mu
```

Returns true if the 'Development mode' option is set

### method optionEnableOnDomainMsgs

```perl6
method optionEnableOnDomainMsgs() returns Mu
```

No Doc

### method optionEnabledForDaemon

```perl6
method optionEnabledForDaemon() returns Mu
```

No Doc

### method optionEnabledForDesktop

```perl6
method optionEnabledForDesktop() returns Mu
```

No Doc

### method optionInScopeOnly

```perl6
method optionInScopeOnly() returns Mu
```

Returns true if the 'In scope only' option is set

### method optionRemoveCSP

```perl6
method optionRemoveCSP() returns Mu
```

Returns true if the 'Remove CSP' option is set

### method optionShowWelcomeScreen

```perl6
method optionShowWelcomeScreen() returns Mu
```

No Doc

### method optionSkipTutorialTasks

```perl6
method optionSkipTutorialTasks() returns Mu
```

No Doc

### method optionTutorialHost

```perl6
method optionTutorialHost() returns Mu
```

No Doc

### method optionTutorialPort

```perl6
method optionTutorialPort() returns Mu
```

No Doc

### method optionTutorialTasksDone

```perl6
method optionTutorialTasksDone() returns Mu
```

No Doc

### method optionTutorialTestMode

```perl6
method optionTutorialTestMode() returns Mu
```

No Doc

### method optionTutorialUpdates

```perl6
method optionTutorialUpdates() returns Mu
```

No Doc

### method tutorialUpdates

```perl6
method tutorialUpdates() returns Mu
```

No Doc

### method upgradedDomains

```perl6
method upgradedDomains() returns Mu
```

No Doc

### method changesInHtml

```perl6
method changesInHtml() returns Mu
```

Returns the changelog in HTML format

### method log

```perl6
method log(
    :$record!
) returns Mu
```

Used by the HUD to log messages from the browser

### method recordRequest

```perl6
method recordRequest(
    :$header!,
    :$body!
) returns Mu
```

Used by the HUD to cache a request the user wants to send in the browser

### method resetTutorialTasks

```perl6
method resetTutorialTasks() returns Mu
```

Reset the tutorial tasks so that they must be completed again

### method setOptionBaseDirectory

```perl6
method setOptionBaseDirectory(
    :$String!
) returns Mu
```

Set the base directory from which the HUD files are loaded

### method setOptionDevelopmentMode

```perl6
method setOptionDevelopmentMode(
    :$Boolean!
) returns Mu
```

Sets the boolean option 'Development mode'

### method setOptionEnableOnDomainMsgs

```perl6
method setOptionEnableOnDomainMsgs(
    :$Boolean!
) returns Mu
```

No Doc

### method setOptionEnabledForDaemon

```perl6
method setOptionEnabledForDaemon(
    :$Boolean!
) returns Mu
```

No Doc

### method setOptionEnabledForDesktop

```perl6
method setOptionEnabledForDesktop(
    :$Boolean!
) returns Mu
```

No Doc

### method setOptionInScopeOnly

```perl6
method setOptionInScopeOnly(
    :$Boolean!
) returns Mu
```

Sets the boolean option 'In scope only'

### method setOptionRemoveCSP

```perl6
method setOptionRemoveCSP(
    :$Boolean!
) returns Mu
```

Sets the boolean option 'Remove CSP'

### method setOptionShowWelcomeScreen

```perl6
method setOptionShowWelcomeScreen(
    :$Boolean!
) returns Mu
```

No Doc

### method setOptionSkipTutorialTasks

```perl6
method setOptionSkipTutorialTasks(
    :$Boolean!
) returns Mu
```

No Doc

### method setOptionTutorialTaskDone

```perl6
method setOptionTutorialTaskDone(
    :$String!
) returns Mu
```

No Doc

### method setOptionTutorialTestMode

```perl6
method setOptionTutorialTestMode(
    :$Boolean!
) returns Mu
```

No Doc

### method setUiOption

```perl6
method setUiOption(
    :$key!,
    :$value
) returns Mu
```

Sets a UI option with the given key and value. The key must be 50 or fewer alphanumeric characters

class Zap::Forceduser
---------------------

class `Zap::Forceduser` Methods

### method setForcedUser

```perl6
method setForcedUser(
    :$contextId!,
    :$userId!
) returns Mu
```

Sets the user (ID) that should be used in 'forced user' mode for the given context (ID)

### method setForcedUserModeEnabled

```perl6
method setForcedUserModeEnabled(
    :$boolean!
) returns Mu
```

Sets if 'forced user' mode should be enabled or not

class Zap::Stats
----------------

class `Zap::Stats` Methods

### method clearStats

```perl6
method clearStats(
    :$keyPrefix
) returns Mu
```

Clears all of the statistics

### method setOptionInMemoryEnabled

```perl6
method setOptionInMemoryEnabled(
    :$Boolean!
) returns Mu
```

Sets whether in memory statistics are enabled

### method setOptionStatsdHost

```perl6
method setOptionStatsdHost(
    :$String!
) returns Mu
```

Sets the Statsd service hostname, supply an empty string to stop using a Statsd service

### method setOptionStatsdPort

```perl6
method setOptionStatsdPort(
    :$Integer!
) returns Mu
```

Sets the Statsd service port

### method setOptionStatsdPrefix

```perl6
method setOptionStatsdPrefix(
    :$String!
) returns Mu
```

Sets the prefix to be applied to all stats sent to the configured Statsd service

### method optionStatsdEnabled

```perl6
method optionStatsdEnabled() returns Mu
```

Returns 'true' if a Statsd server has been correctly configured, otherwise returns 'false'

### method optionStatsdHost

```perl6
method optionStatsdHost() returns Mu
```

Gets the Statsd service hostname

### method optionStatsdPort

```perl6
method optionStatsdPort() returns Mu
```

Gets the Statsd service port

### method optionStatsdPrefix

```perl6
method optionStatsdPrefix() returns Mu
```

Gets the prefix to be applied to all stats sent to the configured Statsd service

### method siteStats

```perl6
method siteStats(
    :$site!,
    :$keyPrefix
) returns Mu
```

Gets all of the global statistics, optionally filtered by a key prefix

### method stats

```perl6
method stats(
    :$keyPrefix
) returns Mu
```

Statistics

class Zap::Alertfilter
----------------------

class `Zap::Alertfilter` Methods

### method addAlertFilter

```perl6
method addAlertFilter(
    :$contextId!,
    :$ruleId!,
    :$newLevel!,
    :$url,
    :$urlIsRegex,
    :$parameter,
    :$enabled,
    :$parameterIsRegex,
    :$attack,
    :$attackIsRegex,
    :$evidence,
    :$evidenceIsRegex
) returns Mu
```

Adds a new alert filter for the context with the given ID.

### method addGlobalAlertFilter

```perl6
method addGlobalAlertFilter(
    :$ruleId!,
    :$newLevel!,
    :$url,
    :$urlIsRegex,
    :$parameter,
    :$enabled,
    :$parameterIsRegex,
    :$attack,
    :$attackIsRegex,
    :$evidence,
    :$evidenceIsRegex
) returns Mu
```

Adds a new global alert filter.

### method removeAlertFilter

```perl6
method removeAlertFilter(
    :$contextId!,
    :$ruleId!,
    :$newLevel!,
    :$url,
    :$urlIsRegex,
    :$parameter,
    :$enabled,
    :$parameterIsRegex,
    :$attack,
    :$attackIsRegex,
    :$evidence,
    :$evidenceIsRegex
) returns Mu
```

Removes an alert filter from the context with the given ID.

### method removeGlobalAlertFilter

```perl6
method removeGlobalAlertFilter(
    :$ruleId!,
    :$newLevel!,
    :$url,
    :$urlIsRegex,
    :$parameter,
    :$enabled,
    :$parameterIsRegex,
    :$attack,
    :$attackIsRegex,
    :$evidence,
    :$evidenceIsRegex
) returns Mu
```

Removes a global alert filter.

class Zap::Ascan
----------------

class `Zap::Ascan` Methods

### method addExcludedParam

```perl6
method addExcludedParam(
    :$name!,
    :$type,
    :$url
) returns Mu
```

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.

### method addScanPolicy

```perl6
method addScanPolicy(
    :$scanPolicyName!,
    :$alertThreshold,
    :$attackStrength
) returns Mu
```

No Doc

### method clearExcludedFromScan

```perl6
method clearExcludedFromScan() returns Mu
```

Clears the regexes of URLs excluded from the active scans.

### method disableAllScanners

```perl6
method disableAllScanners(
    :$scanPolicyName
) returns Mu
```

Disables all scanners of the scan policy with the given name, or the default if none given.

### method disableScanners

```perl6
method disableScanners(
    :$ids!,
    :$scanPolicyName
) returns Mu
```

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.

### method enableAllScanners

```perl6
method enableAllScanners(
    :$scanPolicyName
) returns Mu
```

Enables all scanners of the scan policy with the given name, or the default if none given.

### method enableScanners

```perl6
method enableScanners(
    :$ids!,
    :$scanPolicyName
) returns Mu
```

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.

### method excludeFromScan

```perl6
method excludeFromScan(
    :$regex!
) returns Mu
```

Adds a regex of URLs that should be excluded from the active scans.

### method importScanPolicy

```perl6
method importScanPolicy(
    :$path!
) returns Mu
```

Imports a Scan Policy using the given file system path.

### method modifyExcludedParam

```perl6
method modifyExcludedParam(
    :$idx!,
    :$name,
    :$type,
    :$url
) returns Mu
```

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.

### method pause

```perl6
method pause(
    :$scanId!
) returns Mu
```

No Doc

### method pauseAllScans

```perl6
method pauseAllScans() returns Mu
```

No Doc

### method removeAllScans

```perl6
method removeAllScans() returns Mu
```

No Doc

### method removeExcludedParam

```perl6
method removeExcludedParam(
    :$idx!
) returns Mu
```

Removes a parameter excluded from the scan, with the given index. The index can be obtained with the view excludedParams.

### method removeScan

```perl6
method removeScan(
    :$scanId!
) returns Mu
```

No Doc

### method removeScanPolicy

```perl6
method removeScanPolicy(
    :$scanPolicyName!
) returns Mu
```

No Doc

### method resume

```perl6
method resume(
    :$scanId!
) returns Mu
```

No Doc

### method resumeAllScans

```perl6
method resumeAllScans() returns Mu
```

No Doc

### method scan

```perl6
method scan(
    :$url,
    :$recurse,
    :$inScopeOnly,
    :$scanPolicyName,
    :$method,
    :$postData,
    :$contextId
) returns Mu
```

Runs the active scanner against the given URL and/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.

### method scanAsUser

```perl6
method scanAsUser(
    :$url,
    :$contextId,
    :$userId,
    :$recurse,
    :$scanPolicyName,
    :$method,
    :$postData
) returns Mu
```

Active Scans from the perspective of a User, obtained using the given Context ID and User ID. See 'scan' action for more details.

### method setEnabledPolicies

```perl6
method setEnabledPolicies(
    :$ids!,
    :$scanPolicyName
) returns Mu
```

No Doc

### method setOptionAddQueryParam

```perl6
method setOptionAddQueryParam(
    :$Boolean!
) returns Mu
```

Sets whether or not the active scanner should add a query param to GET requests which do not have parameters to start with.

### method setOptionAllowAttackOnStart

```perl6
method setOptionAllowAttackOnStart(
    :$Boolean!
) returns Mu
```

No Doc

### method setOptionAttackPolicy

```perl6
method setOptionAttackPolicy(
    :$String!
) returns Mu
```

No Doc

### method setOptionDefaultPolicy

```perl6
method setOptionDefaultPolicy(
    :$String!
) returns Mu
```

No Doc

### method setOptionDelayInMs

```perl6
method setOptionDelayInMs(
    :$Integer!
) returns Mu
```

No Doc

### method setOptionHandleAntiCSRFTokens

```perl6
method setOptionHandleAntiCSRFTokens(
    :$Boolean!
) returns Mu
```

No Doc

### method setOptionHostPerScan

```perl6
method setOptionHostPerScan(
    :$Integer!
) returns Mu
```

No Doc

### method setOptionInjectPluginIdInHeader

```perl6
method setOptionInjectPluginIdInHeader(
    :$Boolean!
) returns Mu
```

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.

### method setOptionMaxChartTimeInMins

```perl6
method setOptionMaxChartTimeInMins(
    :$Integer!
) returns Mu
```

No Doc

### method setOptionMaxResultsToList

```perl6
method setOptionMaxResultsToList(
    :$Integer!
) returns Mu
```

No Doc

### method setOptionMaxRuleDurationInMins

```perl6
method setOptionMaxRuleDurationInMins(
    :$Integer!
) returns Mu
```

No Doc

### method setOptionMaxScanDurationInMins

```perl6
method setOptionMaxScanDurationInMins(
    :$Integer!
) returns Mu
```

No Doc

### method setOptionMaxScansInUI

```perl6
method setOptionMaxScansInUI(
    :$Integer!
) returns Mu
```

No Doc

### method setOptionPromptInAttackMode

```perl6
method setOptionPromptInAttackMode(
    :$Boolean!
) returns Mu
```

No Doc

### method setOptionPromptToClearFinishedScans

```perl6
method setOptionPromptToClearFinishedScans(
    :$Boolean!
) returns Mu
```

No Doc

### method setOptionRescanInAttackMode

```perl6
method setOptionRescanInAttackMode(
    :$Boolean!
) returns Mu
```

No Doc

### method setOptionScanHeadersAllRequests

```perl6
method setOptionScanHeadersAllRequests(
    :$Boolean!
) returns Mu
```

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.

### method setOptionShowAdvancedDialog

```perl6
method setOptionShowAdvancedDialog(
    :$Boolean!
) returns Mu
```

No Doc

### method setOptionTargetParamsEnabledRPC

```perl6
method setOptionTargetParamsEnabledRPC(
    :$Integer!
) returns Mu
```

No Doc

### method setOptionTargetParamsInjectable

```perl6
method setOptionTargetParamsInjectable(
    :$Integer!
) returns Mu
```

No Doc

### method setOptionThreadPerHost

```perl6
method setOptionThreadPerHost(
    :$Integer!
) returns Mu
```

No Doc

### method setPolicyAlertThreshold

```perl6
method setPolicyAlertThreshold(
    :$id!,
    :$alertThreshold!,
    :$scanPolicyName
) returns Mu
```

No Doc

### method setPolicyAttackStrength

```perl6
method setPolicyAttackStrength(
    :$id!,
    :$attackStrength!,
    :$scanPolicyName
) returns Mu
```

No Doc

### method setScannerAlertThreshold

```perl6
method setScannerAlertThreshold(
    :$id!,
    :$alertThreshold!,
    :$scanPolicyName
) returns Mu
```

No Doc

### method setScannerAttackStrength

```perl6
method setScannerAttackStrength(
    :$id!,
    :$attackStrength!,
    :$scanPolicyName
) returns Mu
```

No Doc

### method skipScanner

```perl6
method skipScanner(
    :$scanId!,
    :$scannerId!
) returns Mu
```

Skips the scanner using the given IDs of the scan and the scanner.

### method stop

```perl6
method stop(
    :$scanId!
) returns Mu
```

No Doc

### method stopAllScans

```perl6
method stopAllScans() returns Mu
```

No Doc

### method updateScanPolicy

```perl6
method updateScanPolicy(
    :$scanPolicyName!,
    :$alertThreshold,
    :$attackStrength
) returns Mu
```

No Doc

### method excludedFromScan

```perl6
method excludedFromScan() returns Mu
```

Gets the regexes of URLs excluded from the active scans.

### method excludedParamTypes

```perl6
method excludedParamTypes() returns Mu
```

Gets all the types of excluded parameters. For each type the following are shown: the ID and the name.

### method excludedParams

```perl6
method excludedParams() returns Mu
```

Gets all the parameters that are excluded. For each parameter the following are shown: the name, the URL, and the parameter type.

### method messagesIds

```perl6
method messagesIds(
    :$scanId!
) returns Mu
```

Gets the IDs of the messages sent during the scan with the given ID. A message can be obtained with 'message' core view.

### method optionAddQueryParam

```perl6
method optionAddQueryParam() returns Mu
```

Tells whether or not the active scanner should add a query parameter to GET request that don't have parameters to start with.

### method optionAllowAttackOnStart

```perl6
method optionAllowAttackOnStart() returns Mu
```

No Doc

### method optionAttackPolicy

```perl6
method optionAttackPolicy() returns Mu
```

No Doc

### method optionDefaultPolicy

```perl6
method optionDefaultPolicy() returns Mu
```

No Doc

### method optionDelayInMs

```perl6
method optionDelayInMs() returns Mu
```

No Doc

### method optionExcludedParamList

```perl6
method optionExcludedParamList() returns Mu
```

Use view excludedParams instead.

### method optionHandleAntiCSRFTokens

```perl6
method optionHandleAntiCSRFTokens() returns Mu
```

No Doc

### method optionHostPerScan

```perl6
method optionHostPerScan() returns Mu
```

No Doc

### method optionInjectPluginIdInHeader

```perl6
method optionInjectPluginIdInHeader() returns Mu
```

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.

### method optionMaxChartTimeInMins

```perl6
method optionMaxChartTimeInMins() returns Mu
```

No Doc

### method optionMaxResultsToList

```perl6
method optionMaxResultsToList() returns Mu
```

No Doc

### method optionMaxRuleDurationInMins

```perl6
method optionMaxRuleDurationInMins() returns Mu
```

No Doc

### method optionMaxScanDurationInMins

```perl6
method optionMaxScanDurationInMins() returns Mu
```

No Doc

### method optionMaxScansInUI

```perl6
method optionMaxScansInUI() returns Mu
```

No Doc

### method optionPromptInAttackMode

```perl6
method optionPromptInAttackMode() returns Mu
```

No Doc

### method optionPromptToClearFinishedScans

```perl6
method optionPromptToClearFinishedScans() returns Mu
```

No Doc

### method optionRescanInAttackMode

```perl6
method optionRescanInAttackMode() returns Mu
```

No Doc

### method optionScanHeadersAllRequests

```perl6
method optionScanHeadersAllRequests() returns Mu
```

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.

### method optionShowAdvancedDialog

```perl6
method optionShowAdvancedDialog() returns Mu
```

No Doc

### method optionTargetParamsEnabledRPC

```perl6
method optionTargetParamsEnabledRPC() returns Mu
```

No Doc

### method optionTargetParamsInjectable

```perl6
method optionTargetParamsInjectable() returns Mu
```

No Doc

### method optionThreadPerHost

```perl6
method optionThreadPerHost() returns Mu
```

No Doc

### method policies

```perl6
method policies(
    :$scanPolicyName,
    :$policyId
) returns Mu
```

No Doc

### method scanPolicyNames

```perl6
method scanPolicyNames() returns Mu
```

No Doc

### method scanProgress

```perl6
method scanProgress(
    :$scanId
) returns Mu
```

No Doc

### method scanners

```perl6
method scanners(
    :$scanPolicyName,
    :$policyId
) returns Mu
```

Gets the scanners, optionally, of the given scan policy and/or scanner policy/category ID.

### method scans

```perl6
method scans() returns Mu
```

No Doc

### method status

```perl6
method status(
    :$scanId
) returns Mu
```

No Doc

class Zap::Spider
-----------------

class `Zap::Spider` Methods

### method domainsAlwaysInScope

```perl6
method domainsAlwaysInScope() returns Mu
```

Gets all the domains that are always in scope. For each domain the following are shown: the index, the value (domain), if enabled, and if specified as a regex.

### method excludedFromScan

```perl6
method excludedFromScan() returns Mu
```

Gets the regexes of URLs excluded from the spider scans.

### method fullResults

```perl6
method fullResults(
    :$scanId!
) returns Mu
```

No Doc

### method optionAcceptCookies

```perl6
method optionAcceptCookies() returns Mu
```

Gets whether or not a spider process should accept cookies while spidering.

### method optionDomainsAlwaysInScope

```perl6
method optionDomainsAlwaysInScope() returns Mu
```

Use view domainsAlwaysInScope instead.

### method optionDomainsAlwaysInScopeEnabled

```perl6
method optionDomainsAlwaysInScopeEnabled() returns Mu
```

Use view domainsAlwaysInScope instead.

### method optionHandleODataParametersVisited

```perl6
method optionHandleODataParametersVisited() returns Mu
```

No Doc

### method optionHandleParameters

```perl6
method optionHandleParameters() returns Mu
```

No Doc

### method optionMaxChildren

```perl6
method optionMaxChildren() returns Mu
```

Gets the maximum number of child nodes (per node) that can be crawled, 0 means no limit.

### method optionMaxDepth

```perl6
method optionMaxDepth() returns Mu
```

Gets the maximum depth the spider can crawl, 0 if unlimited.

### method optionMaxDuration

```perl6
method optionMaxDuration() returns Mu
```

No Doc

### method optionMaxParseSizeBytes

```perl6
method optionMaxParseSizeBytes() returns Mu
```

Gets the maximum size, in bytes, that a response might have to be parsed.

### method optionMaxScansInUI

```perl6
method optionMaxScansInUI() returns Mu
```

No Doc

### method optionParseComments

```perl6
method optionParseComments() returns Mu
```

No Doc

### method optionParseGit

```perl6
method optionParseGit() returns Mu
```

No Doc

### method optionParseRobotsTxt

```perl6
method optionParseRobotsTxt() returns Mu
```

No Doc

### method optionParseSVNEntries

```perl6
method optionParseSVNEntries() returns Mu
```

No Doc

### method optionParseSitemapXml

```perl6
method optionParseSitemapXml() returns Mu
```

No Doc

### method optionPostForm

```perl6
method optionPostForm() returns Mu
```

No Doc

### method optionProcessForm

```perl6
method optionProcessForm() returns Mu
```

No Doc

### method optionRequestWaitTime

```perl6
method optionRequestWaitTime() returns Mu
```

No Doc

### method optionScope

```perl6
method optionScope() returns Mu
```

No Doc

### method optionScopeText

```perl6
method optionScopeText() returns Mu
```

No Doc

### method optionSendRefererHeader

```perl6
method optionSendRefererHeader() returns Mu
```

Gets whether or not the 'Referer' header should be sent while spidering.

### method optionShowAdvancedDialog

```perl6
method optionShowAdvancedDialog() returns Mu
```

No Doc

### method optionSkipURLString

```perl6
method optionSkipURLString() returns Mu
```

No Doc

### method optionThreadCount

```perl6
method optionThreadCount() returns Mu
```

No Doc

### method optionUserAgent

```perl6
method optionUserAgent() returns Mu
```

No Doc

### method results

```perl6
method results(
    :$scanId
) returns Mu
```

No Doc

### method scans

```perl6
method scans() returns Mu
```

No Doc

### method status

```perl6
method status(
    :$scanId
) returns Mu
```

No Doc

### method addDomainAlwaysInScope

```perl6
method addDomainAlwaysInScope(
    :$value!,
    :$isRegex,
    :$isEnabled
) returns Mu
```

Adds a new domain that's always in scope, using the specified value. Optionally sets if the new entry is enabled (default, true) and whether or not the new value is specified as a regex (default, false).

### method clearExcludedFromScan

```perl6
method clearExcludedFromScan() returns Mu
```

Clears the regexes of URLs excluded from the spider scans.

### method disableAllDomainsAlwaysInScope

```perl6
method disableAllDomainsAlwaysInScope() returns Mu
```

Disables all domains that are always in scope.

### method enableAllDomainsAlwaysInScope

```perl6
method enableAllDomainsAlwaysInScope() returns Mu
```

Enables all domains that are always in scope.

### method excludeFromScan

```perl6
method excludeFromScan(
    :$regex!
) returns Mu
```

Adds a regex of URLs that should be excluded from the spider scans.

### method modifyDomainAlwaysInScope

```perl6
method modifyDomainAlwaysInScope(
    :$idx!,
    :$value,
    :$isRegex,
    :$isEnabled
) returns Mu
```

Modifies a domain that's always in scope. Allows to modify the value, if enabled or if a regex. The domain is selected with its index, which can be obtained with the view domainsAlwaysInScope.

### method pause

```perl6
method pause(
    :$scanId!
) returns Mu
```

No Doc

### method pauseAllScans

```perl6
method pauseAllScans() returns Mu
```

No Doc

### method removeAllScans

```perl6
method removeAllScans() returns Mu
```

No Doc

### method removeDomainAlwaysInScope

```perl6
method removeDomainAlwaysInScope(
    :$idx!
) returns Mu
```

Removes a domain that's always in scope, with the given index. The index can be obtained with the view domainsAlwaysInScope.

### method removeScan

```perl6
method removeScan(
    :$scanId!
) returns Mu
```

No Doc

### method resume

```perl6
method resume(
    :$scanId!
) returns Mu
```

No Doc

### method resumeAllScans

```perl6
method resumeAllScans() returns Mu
```

No Doc

### method scan

```perl6
method scan(
    :$url,
    :$maxChildren,
    :$recurse,
    :$contextName,
    :$subtreeOnly
) returns Mu
```

Runs the spider against the given URL (or context). Optionally, the 'maxChildren' parameter can be set to limit the number of children scanned, the 'recurse' parameter can be used to prevent the spider from seeding recursively, the parameter 'contextName' can be used to constrain the scan to a Context and the parameter 'subtreeOnly' allows to restrict the spider under a site's subtree (using the specified 'url').

### method scanAsUser

```perl6
method scanAsUser(
    :$contextId!,
    :$userId!,
    :$url,
    :$maxChildren,
    :$recurse,
    :$subtreeOnly
) returns Mu
```

Runs the spider from the perspective of a User, obtained using the given Context ID and User ID. See 'scan' action for more details.

### method setOptionAcceptCookies

```perl6
method setOptionAcceptCookies(
    :$Boolean!
) returns Mu
```

Sets whether or not a spider process should accept cookies while spidering.

### method setOptionHandleODataParametersVisited

