Class AjaxSpider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllowedResource(String regex, String enabled) Adds an allowed resource.addExcludedElement(String contextname, String description, String element, String xpath, String text, String attributename, String attributevalue, String enabled) Adds an excluded element to a context.Gets the allowed resources.excludedElements(String contextname) Gets the excluded elements.Gets the full crawled content detected by the AJAX Spider.modifyExcludedElement(String contextname, String description, String element, String descriptionnew, String xpath, String text, String attributename, String attributevalue, String enabled) Modifies an excluded element of a context.Gets the number of resources found.Gets the configured browser to use for crawling.Gets the configured value for 'Click Default Elements Only', HTML elements such as 'a', 'button', 'input', all associated with some action or links on the page.Gets the value configured for the AJAX Spider to know if it should click on the elements only once.This component is optional and therefore the API will only work if it is installedGets the time to wait after an event (in milliseconds).Gets the configured value for the max crawl depth.Gets the configured value for the maximum crawl states allowed.Gets the configured max duration of the crawl, the value is in minutes.Gets the configured number of browsers to be used.Gets if the AJAX Spider will use random values in form fields when crawling, if set to true.Gets the configured time to wait after reloading the page, this value is in milliseconds.removeAllowedResource(String regex) Removes an allowed resource.removeExcludedElement(String contextname, String description) Removes an excluded element from a context.Gets the current results of the crawler.Runs the AJAX Spider against a given target.scanAsUser(String contextname, String username, String url, String subtreeonly) Runs the AJAX Spider from the perspective of a User of the web application.setEnabledAllowedResource(String regex, String enabled) Sets whether or not an allowed resource is enabled.setOptionBrowserId(String string) Sets the configuration of the AJAX Spider to use one of the supported browsers.setOptionClickDefaultElems(boolean bool) Sets whether or not the AJAX Spider will only click on the default HTML elements.setOptionClickElemsOnce(boolean bool) When enabled, the crawler attempts to interact with each element (e.g., by clicking) only once.setOptionEnableExtensions(boolean bool) This component is optional and therefore the API will only work if it is installedsetOptionEventWait(int i) Sets the time to wait after an event (in milliseconds).setOptionMaxCrawlDepth(int i) Sets the maximum depth that the crawler can reach.setOptionMaxCrawlStates(int i) Sets the maximum number of states that the crawler should crawl.setOptionMaxDuration(int i) The maximum time that the crawler is allowed to run.setOptionNumberOfBrowsers(int i) Sets the number of windows to be used by AJAX Spider.setOptionRandomInputs(boolean bool) When enabled, inserts random values into form fields.setOptionReloadWait(int i) Sets the time to wait after the page is loaded before interacting with it.status()Gets the current status of the crawler.stop()Stops the AJAX Spider.Methods inherited from class org.zaproxy.clientapi.gen.deprecated.AjaxSpiderDeprecated
scan, setOptionBrowserId, setOptionClickDefaultElems, setOptionClickElemsOnce, setOptionEventWait, setOptionMaxCrawlDepth, setOptionMaxCrawlStates, setOptionMaxDuration, setOptionNumberOfBrowsers, setOptionRandomInputs, setOptionReloadWait, stop
-
Constructor Details
-
AjaxSpider
-
-
Method Details
-
allowedResources
Gets the allowed resources. The allowed resources are always fetched even if out of scope, allowing to include necessary resources (e.g. scripts) from 3rd-parties.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
excludedElements
Gets the excluded elements. The excluded elements are not clicked during crawling, for example, to prevent logging out.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
status
Gets the current status of the crawler. Actual values are Stopped and Running.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
results
Gets the current results of the crawler.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
numberOfResults
Gets the number of resources found.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
fullResults
Gets the full crawled content detected by the AJAX Spider. Returns a set of values based on 'inScope' URLs, 'outOfScope' URLs, and 'errors' encountered during the last/current run of the AJAX Spider.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
optionBrowserId
Gets the configured browser to use for crawling.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
optionEventWait
Gets the time to wait after an event (in milliseconds). For example: the wait delay after the cursor hovers over an element, in order for a menu to display, etc.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
optionMaxCrawlDepth
Gets the configured value for the max crawl depth.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
optionMaxCrawlStates
Gets the configured value for the maximum crawl states allowed.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
optionMaxDuration
Gets the configured max duration of the crawl, the value is in minutes.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
optionNumberOfBrowsers
Gets the configured number of browsers to be used.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
optionReloadWait
Gets the configured time to wait after reloading the page, this value is in milliseconds.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
optionClickDefaultElems
Gets the configured value for 'Click Default Elements Only', HTML elements such as 'a', 'button', 'input', all associated with some action or links on the page.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
optionClickElemsOnce
Gets the value configured for the AJAX Spider to know if it should click on the elements only once.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
optionEnableExtensions
This component is optional and therefore the API will only work if it is installed- Throws:
ClientApiException
-
optionRandomInputs
Gets if the AJAX Spider will use random values in form fields when crawling, if set to true.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
scan
public ApiResponse scan(String url, String inscope, String contextname, String subtreeonly) throws ClientApiException Runs the AJAX Spider against a given target.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
scanAsUser
public ApiResponse scanAsUser(String contextname, String username, String url, String subtreeonly) throws ClientApiException Runs the AJAX Spider from the perspective of a User of the web application.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
stop
Stops the AJAX Spider.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
addAllowedResource
Adds an allowed resource.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
addExcludedElement
public ApiResponse addExcludedElement(String contextname, String description, String element, String xpath, String text, String attributename, String attributevalue, String enabled) throws ClientApiException Adds an excluded element to a context.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
modifyExcludedElement
public ApiResponse modifyExcludedElement(String contextname, String description, String element, String descriptionnew, String xpath, String text, String attributename, String attributevalue, String enabled) throws ClientApiException Modifies an excluded element of a context.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
removeExcludedElement
public ApiResponse removeExcludedElement(String contextname, String description) throws ClientApiException Removes an excluded element from a context.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
removeAllowedResource
Removes an allowed resource.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
setEnabledAllowedResource
public ApiResponse setEnabledAllowedResource(String regex, String enabled) throws ClientApiException Sets whether or not an allowed resource is enabled.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
setOptionBrowserId
Sets the configuration of the AJAX Spider to use one of the supported browsers.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
setOptionClickDefaultElems
Sets whether or not the AJAX Spider will only click on the default HTML elements.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
setOptionClickElemsOnce
When enabled, the crawler attempts to interact with each element (e.g., by clicking) only once.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
setOptionEnableExtensions
This component is optional and therefore the API will only work if it is installed- Throws:
ClientApiException
-
setOptionEventWait
Sets the time to wait after an event (in milliseconds). For example: the wait delay after the cursor hovers over an element, in order for a menu to display, etc.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
setOptionMaxCrawlDepth
Sets the maximum depth that the crawler can reach.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
setOptionMaxCrawlStates
Sets the maximum number of states that the crawler should crawl.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
setOptionMaxDuration
The maximum time that the crawler is allowed to run.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
setOptionNumberOfBrowsers
Sets the number of windows to be used by AJAX Spider.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
setOptionRandomInputs
When enabled, inserts random values into form fields.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-
setOptionReloadWait
Sets the time to wait after the page is loaded before interacting with it.This component is optional and therefore the API will only work if it is installed
- Throws:
ClientApiException
-