Skip to content

Commit 6ad37b9

Browse files
committed
fuzz: Remove breadth-first UI and migrate config
Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
1 parent f68a459 commit 6ad37b9

4 files changed

Lines changed: 25 additions & 123 deletions

File tree

addOns/fuzz/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55

66
## Unreleased
77
### Changed
8+
- Remove the payload replacement strategy option (depth/breadth first) from fuzzer options; breadth-first and depth-first currently behave the same.
89
- Update minimum ZAP version to 2.17.0.
910
- Update dependency.
1011
- Maintenance changes.

addOns/fuzz/src/main/java/org/zaproxy/zap/extension/fuzz/FuzzOptionsPanel.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,21 @@ public FuzzOptionsPanel(
246246
JScrollPane scrollPane = new JScrollPane(innerPanel);
247247
scrollPane.setBorder(BorderFactory.createEmptyBorder());
248248

249+
hidePayloadReplacementStrategyUi(
250+
payloadReplacementStrategyLabel,
251+
depthFirstPayloadReplacementStrategyRadioButton,
252+
breadthFirstPayloadReplacementStrategyRadioButton);
253+
249254
add(scrollPane);
250255
}
251256

257+
private static void hidePayloadReplacementStrategyUi(
258+
JLabel label, JRadioButton depthFirst, JRadioButton breadthFirst) {
259+
label.setVisible(false);
260+
depthFirst.setVisible(false);
261+
breadthFirst.setVisible(false);
262+
}
263+
252264
void setFuzzersDir(FuzzersDir fuzzersDir) {
253265
DefaultComboBoxModel<String> model = new DefaultComboBoxModel<>();
254266
for (FuzzerPayloadCategory category : fuzzersDir.getCategories()) {

addOns/fuzz/src/main/java/org/zaproxy/zap/extension/fuzz/impl/FuzzerOptionsPanel.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,21 @@ public FuzzerOptionsPanel(
240240
scrollPane.setViewportView(innerPanel);
241241
scrollPane.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED));
242242

243+
hidePayloadReplacementStrategyUi(
244+
payloadReplacementStrategyLabel,
245+
depthFirstPayloadReplacementStrategyRadioButton,
246+
breadthFirstPayloadReplacementStrategyRadioButton);
247+
243248
add(scrollPane);
244249
}
245250

251+
private static void hidePayloadReplacementStrategyUi(
252+
JLabel label, JRadioButton depthFirst, JRadioButton breadthFirst) {
253+
label.setVisible(false);
254+
depthFirst.setVisible(false);
255+
breadthFirst.setVisible(false);
256+
}
257+
246258
public boolean validateFields() {
247259
FuzzerOptions baseOptions =
248260
new FuzzerOptions(

addOns/fuzz/src/test/java/org/zaproxy/zap/extension/fuzz/FuzzOptionsUnitTest.java

Lines changed: 0 additions & 123 deletions
This file was deleted.

0 commit comments

Comments
 (0)