Skip to content

Commit

Permalink
Merge pull request #467 from thc202/updates
Browse files Browse the repository at this point in the history
Update scripts/READMEs
  • Loading branch information
psiinon authored Sep 13, 2024
2 parents 859f8e9 + 6e26ec1 commit c3f2e2b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 31 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Extender script 'ScanMonitor.js'
### Changed
- Add cautionary note to help and readme.
- Maintenance and documentation changes.

### Fixed
- Bug in 'Mutliple Security Header Check.js'.

Expand Down
4 changes: 0 additions & 4 deletions authentication/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ function authenticate(helper, paramsValues, credentials) {
// Set the number of maximum redirects followed to 5 (default is 100). Main purpose is to prevent infinite loops.
// helper.getHttpSender().setMaxRedirects(5)

// Allow circular redirects (default is not allow). Circular redirects happen when a request
// redirects to itself, or when a same request was already accessed in a chain of redirects.
// helper.getHttpSender().setAllowCircularRedirects(true)

helper.sendAndReceive(msg);

return msg;
Expand Down
15 changes: 3 additions & 12 deletions httpsender/LogMessages.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,9 @@
// To use this script in the Docker packaged scans use the scan-hook LogRequestsHook.py
// This script can be used outside of docker but if so change the /zap/wrk/ directory to be a valid local directory.

// 'initiator' is the component the initiated the request:
// 1 PROXY_INITIATOR
// 2 ACTIVE_SCANNER_INITIATOR
// 3 SPIDER_INITIATOR
// 4 FUZZER_INITIATOR
// 5 AUTHENTICATION_INITIATOR
// 6 MANUAL_REQUEST_INITIATOR
// 8 BEAN_SHELL_INITIATOR
// 9 ACCESS_CONTROL_SCANNER_INITIATOR
// 10 AJAX_SPIDER_INITIATOR
// For the latest list of values see the HttpSender class:
// https://github.com/zaproxy/zaproxy/blob/main/zap/src/main/java/org/parosproxy/paros/network/HttpSender.java
// 'initiator' is the component the initiated the request.
// For the latest list of values see the "Request Initiator" entries in the constants documentation:
// https://www.zaproxy.org/docs/constants/
// 'helper' just has one method at the moment: helper.getHttpSender() which returns the HttpSender
// instance used to send the request.

Expand Down
6 changes: 3 additions & 3 deletions httpsender/add-more-headers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This HttpSender script adds headers to all messages transmitted by zaproxy,
// including automated tools. Refer to the HttpSender class definition:
// https://github.com/zaproxy/zaproxy/blob/main/zap/src/main/java/org/parosproxy/paros/network/HttpSender.java
// for a list of 'initiator' values (although we don't use them).
// including automated tools. Refer to the constants documentation:
// https://www.zaproxy.org/docs/constants/
// for a list of 'initiator' (Request Initiator) values (although we don't use them).

var ScriptVars = Java.type("org.zaproxy.zap.extension.script.ScriptVars");

Expand Down
15 changes: 3 additions & 12 deletions selenium/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,9 @@ They have access to the launched browser and can interact with it, for example,
The util parameter has the following methods:
getWebDriver() Returns the WebDriver:
https://www.javadoc.io/doc/org.seleniumhq.selenium/selenium-api/3.141.0/org/openqa/selenium/WebDriver.html
getRequester() Returns the identifier of the requester:
1 PROXY_INITIATOR
2 ACTIVE_SCANNER_INITIATOR
3 SPIDER_INITIATOR
4 FUZZER_INITIATOR
5 AUTHENTICATION_INITIATOR
6 MANUAL_REQUEST_INITIATOR
8 BEAN_SHELL_INITIATOR
9 ACCESS_CONTROL_SCANNER_INITIATOR
10 AJAX_SPIDER_INITIATOR
For the latest list of values see the HttpSender class:
https://github.com/zaproxy/zaproxy/blob/main/zap/src/main/java/org/parosproxy/paros/network/HttpSender.java
getRequester() Returns the identifier of the requester.
For the latest list of values see the "Request Initiator" entries in the constants documentation:
https://www.zaproxy.org/docs/constants/
getBrowserId() Returns the browser Id, eg "firefox" or "chrome"
getProxyAddress() Returns the address of the proxy
getProxyPort() Returns the port of the proxy
Expand Down

0 comments on commit c3f2e2b

Please sign in to comment.