-
-
Notifications
You must be signed in to change notification settings - Fork 254
Add other/tips section - part 1 #352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This is what I came up with for standalone script code to add a rule: // This script adds a Replacer rule
var Control = Java.type("org.parosproxy.paros.control.Control");
var extReplacer = Control.getSingleton().getExtensionLoader().getExtension("ExtensionReplacer");
var replacerRule = Java.type("org.zaproxy.zap.extension.replacer.ReplacerParamRule");
// Match types: REQ_HEADER, REQ_HEADER_STR, REQ_BODY_STR, RESP_HEADER, RESP_HEADER_STR, RESP_BODY_STR
var matchType = Java.type("org.zaproxy.zap.extension.replacer.ReplacerParamRule.MatchType");
// https://github.com/zaproxy/zap-extensions/blob/e072df8ca4f7aff54d6e2dda98cfd8503810fa2c/addOns/replacer/src/main/java/org/zaproxy/zap/extension/replacer/ReplacerParamRule.java#L93-L107
var newRule = new replacerRule("Show hidden UI elements", "", matchType.RESP_BODY_STR, "hidden", false, "hizzen", null, true, false);
extReplacer.getParams().addRule(newRule);Method ref// public ReplacerParamRule(
// String description,
// String url,
// MatchType matchType,
// String matchString,
// boolean matchRegex,
// String replacement,
// List<Integer> initiators,
// boolean enabled,
// boolean tokenProcessingEnabled)I did discover that replacer doesn't prevent creation of duplicates. Not sure if we should care about that or not? Shall I add these in |
|
As discussed via IRC the code refs could be permalinked to the github repo with commit sha. |
e655329 to
6f5c41f
Compare
a90fb33 to
5c1562e
Compare
|
I think this is good to go. I'll add the script bits in another PR. |
- Add initial tips and supporting images. Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
|
Okay really ready for review this time 😉 |
|
Thank you! |
|
For whoever adds the second review. I know the folder structure probably needs some intro'ish README.md files. I'll tackle that in the next (or a future) PR. |
Uh oh!
There was an error while loading. Please reload this page.