diff --git a/src/zapv2/ajaxSpider.py b/src/zapv2/ajaxSpider.py index 3a6885c..cf24d0e 100644 --- a/src/zapv2/ajaxSpider.py +++ b/src/zapv2/ajaxSpider.py @@ -2,7 +2,7 @@ # # ZAP is an HTTP/HTTPS proxy for assessing web application security. # -# Copyright 2016 the ZAP development team +# Copyright 2017 the ZAP development team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -131,6 +131,7 @@ def option_random_inputs(self): def scan(self, url=None, inscope=None, contextname=None, subtreeonly=None, apikey=''): """ + Runs the spider against the given URL and/or context, optionally, spidering everything in scope. The parameter 'contextName' can be used to constrain the scan to a Context, the option 'in scope' is ignored if a context was also specified. The parameter 'subtreeOnly' allows to restrict the spider under a site's subtree (using the specified 'url'). This component is optional and therefore the API will only work if it is installed """ params = {'apikey': apikey} @@ -146,6 +147,7 @@ def scan(self, url=None, inscope=None, contextname=None, subtreeonly=None, apike def scan_as_user(self, contextname, username, url=None, subtreeonly=None, apikey=''): """ + Runs the spider from the perspective of a User, obtained using the given context name and user name. The parameter 'url' allows to specify the starting point for the spider, otherwise it's used an existing URL from the context (if any). The parameter 'subtreeOnly' allows to restrict the spider under a site's subtree (using the specified 'url'). This component is optional and therefore the API will only work if it is installed """ params = {'contextName': contextname, 'userName': username, 'apikey': apikey} diff --git a/src/zapv2/reveal.py b/src/zapv2/reveal.py index 974cd51..503887f 100644 --- a/src/zapv2/reveal.py +++ b/src/zapv2/reveal.py @@ -2,7 +2,7 @@ # # ZAP is an HTTP/HTTPS proxy for assessing web application security. # -# Copyright 2016 the ZAP development team +# Copyright 2017 the ZAP development team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -30,12 +30,14 @@ def __init__(self, zap): @property def reveal(self): """ + Tells if shows hidden fields and enables disabled fields This component is optional and therefore the API will only work if it is installed """ return six.next(six.itervalues(self.zap._request(self.zap.base + 'reveal/view/reveal/'))) def set_reveal(self, reveal, apikey=''): """ + Sets if shows hidden fields and enables disabled fields This component is optional and therefore the API will only work if it is installed """ return six.next(six.itervalues(self.zap._request(self.zap.base + 'reveal/action/setReveal/', {'reveal': reveal, 'apikey': apikey}))) diff --git a/src/zapv2/selenium.py b/src/zapv2/selenium.py index a7bbbb7..6fb93e1 100644 --- a/src/zapv2/selenium.py +++ b/src/zapv2/selenium.py @@ -2,7 +2,7 @@ # # ZAP is an HTTP/HTTPS proxy for assessing web application security. # -# Copyright 2016 the ZAP development team +# Copyright 2017 the ZAP development team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ def __init__(self, zap): @property def option_chrome_driver_path(self): """ + Returns the current path to ChromeDriver This component is optional and therefore the API will only work if it is installed """ return six.next(six.itervalues(self.zap._request(self.zap.base + 'selenium/view/optionChromeDriverPath/'))) @@ -37,6 +38,7 @@ def option_chrome_driver_path(self): @property def option_firefox_binary_path(self): """ + Returns the current path to Firefox binary This component is optional and therefore the API will only work if it is installed """ return six.next(six.itervalues(self.zap._request(self.zap.base + 'selenium/view/optionFirefoxBinaryPath/'))) @@ -44,6 +46,7 @@ def option_firefox_binary_path(self): @property def option_firefox_driver_path(self): """ + Returns the current path to Firefox driver (geckodriver) This component is optional and therefore the API will only work if it is installed """ return six.next(six.itervalues(self.zap._request(self.zap.base + 'selenium/view/optionFirefoxDriverPath/'))) @@ -51,6 +54,7 @@ def option_firefox_driver_path(self): @property def option_ie_driver_path(self): """ + Returns the current path to IEDriverServer This component is optional and therefore the API will only work if it is installed """ return six.next(six.itervalues(self.zap._request(self.zap.base + 'selenium/view/optionIeDriverPath/'))) @@ -58,36 +62,42 @@ def option_ie_driver_path(self): @property def option_phantom_js_binary_path(self): """ + Returns the current path to PhantomJS binary This component is optional and therefore the API will only work if it is installed """ return six.next(six.itervalues(self.zap._request(self.zap.base + 'selenium/view/optionPhantomJsBinaryPath/'))) def set_option_chrome_driver_path(self, string, apikey=''): """ + Sets the current path to ChromeDriver This component is optional and therefore the API will only work if it is installed """ return six.next(six.itervalues(self.zap._request(self.zap.base + 'selenium/action/setOptionChromeDriverPath/', {'String': string, 'apikey': apikey}))) def set_option_firefox_binary_path(self, string, apikey=''): """ + Sets the current path to Firefox binary This component is optional and therefore the API will only work if it is installed """ return six.next(six.itervalues(self.zap._request(self.zap.base + 'selenium/action/setOptionFirefoxBinaryPath/', {'String': string, 'apikey': apikey}))) def set_option_firefox_driver_path(self, string, apikey=''): """ + Sets the current path to Firefox driver (geckodriver) This component is optional and therefore the API will only work if it is installed """ return six.next(six.itervalues(self.zap._request(self.zap.base + 'selenium/action/setOptionFirefoxDriverPath/', {'String': string, 'apikey': apikey}))) def set_option_ie_driver_path(self, string, apikey=''): """ + Sets the current path to IEDriverServer This component is optional and therefore the API will only work if it is installed """ return six.next(six.itervalues(self.zap._request(self.zap.base + 'selenium/action/setOptionIeDriverPath/', {'String': string, 'apikey': apikey}))) def set_option_phantom_js_binary_path(self, string, apikey=''): """ + Sets the current path to PhantomJS binary This component is optional and therefore the API will only work if it is installed """ return six.next(six.itervalues(self.zap._request(self.zap.base + 'selenium/action/setOptionPhantomJsBinaryPath/', {'String': string, 'apikey': apikey})))