Skip to content

Commit 24e5eef

Browse files
authored
Merge pull request #47 from gdgd009xcd/JOHANNESS241219
## [v0.8.16] - 2024-12-20
2 parents d3711e2 + 69a8de2 commit 24e5eef

22 files changed

+350
-44
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
- name: add JAVA_HOME/bin to PATH
2828
run: |
2929
echo "$JAVA_HOME/bin" >> $GITHUB_PATH
30+
- name: check java version
31+
run: java --version
3032
- name: set env.ZAP_ADDON_BUILD_BIN_DIR
3133
run: |
3234
echo "ZAP_ADDON_BUILD_BIN_DIR=${{env.ZAP_ADDON_BUILD_DIR}}/bin" >> $GITHUB_ENV

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,12 @@ This addon is 3rd party addon, so you must add this addon file to ZAPROXY manual
9494
1. restart zap(sorry, currently this addon does not work unless restart zap after install it.)
9595

9696
## how to use
97-
This is automatically called when you start active scannig after already installed default scanners.
97+
This is automatically called when you start active scannig after already installed default scanners.<br>
98+
If this addon look like doing nothing, you should check:<br> [Tools->Options->Active Scan Input Vectors] option panel.<br>
99+
If nothing is enabled in this options panel,<br>you may push [Reset to factory defaults] button or check on individually.
100+
101+
![InputVectors](assets/images/activescaninputvectors.png)
102+
98103
If you have any doubts whether this scanner is actually being called, you can import the [CustomScan.policy](CustomScan.policy) file. This policy forces the use of CustomScan when invoking active scan. using guide is follows:
99104

100105
1) download [CustomScan.policy](CustomScan.policy)

addOns/customactivescan/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ All notable changes to this add-on will be documented in this file.
33

44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55

6+
## [v0.8.16] - 2024-12-20
7+
### Changed
8+
- maintenance: Tweaked codes to prepare for new java version and ubuntu 24.04
9+
610
## [v0.8.15] - 2024-12-17
711
### Changed
812
- maintenance: Code was changed to prepare for new java version and ubuntu 24.04

addOns/customactivescan/customactivescan.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import org.zaproxy.gradle.addon.AddOnStatus
22

33

4-
version = "0.8.15"
4+
version = "0.8.16"
55
description = "a Active Scanner with custmizable rules"
66

77
val jar by tasks.getting(Jar::class) {

addOns/customactivescan/src/main/java/org/zaproxy/zap/extension/customactivescan/CustomSQLInjectionScanRule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public void init() {
133133
SwingUtilities.invokeAndWait(new Runnable() {
134134
@Override
135135
public void run() {
136-
ScanLogPanelFrame frame = new ScanLogPanelFrame(flagResultItemArray, finalScannerId);
136+
ScanLogPanelFrame frame = ScanLogPanelFrame.newInstance(flagResultItemArray, finalScannerId);
137137
ExtensionAscanRules.registerScanLogPanelFrame(finalScannerId, frame);
138138
ascan.addScannerListener(new CustomScannerListener());
139139
frame.updateRequestCounter(0);

addOns/customactivescan/src/main/java/org/zaproxy/zap/extension/customactivescan/ExtensionAscanRules.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public void hook(ExtensionHook hook) {
131131
scannerIdWaitTimerMap = new ConcurrentHashMap<>();
132132
}
133133

134-
this.mainWorkPanelTab = new MainWorkPanelTab(hook, this);
134+
this.mainWorkPanelTab = MainWorkPanelTab.newInstance(hook, this);
135135

136136
hook
137137
.getHookView()
@@ -141,7 +141,7 @@ public void hook(ExtensionHook hook) {
141141
//hook.getHookMenu().addPopupMenuItem(getPopUpMenuInAlert());
142142

143143
// popUp item for ScanLogPanel.
144-
hook.getHookMenu().addPopupMenuItem(new PopUpMenuItem(ScanLogPanel.class,"showMessage", cIcon));
144+
hook.getHookMenu().addPopupMenuItem(PopUpMenuItem.newInstance(ScanLogPanel.class,"showMessage", cIcon));
145145
}
146146

147147
private PopUpMenuInAlert getPopUpMenuInAlert() {

addOns/customactivescan/src/main/java/org/zaproxy/zap/extension/customactivescan/ParmGenBinUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88
// ByteArray
99
//
10-
public final class ParmGenBinUtil {
10+
public class ParmGenBinUtil {
1111

1212
private ByteArrayOutputStream bstream = null;
1313

@@ -34,7 +34,7 @@ public int length() {
3434
* @param bin
3535
* @return
3636
*/
37-
public boolean concat(byte[] bin) {
37+
public final boolean concat(byte[] bin) {
3838

3939
if ((bin == null)) {
4040
return false;

addOns/customactivescan/src/main/java/org/zaproxy/zap/extension/customactivescan/ParmGenMacroTraceParams.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.zaproxy.zap.extension.customactivescan;
22

3-
public final class ParmGenMacroTraceParams {
3+
public class ParmGenMacroTraceParams {
44
int scannerId = -1;
55
private int tabIndex = -1; // Macro Request List tabindex in MacroBuilderUI
66
private int selected_request = -1; // scan target request stepno in ParmGenMacroTrace stepno

addOns/customactivescan/src/main/java/org/zaproxy/zap/extension/customactivescan/view/AddFlagRegex.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,35 @@
88
import java.util.List;
99

1010
@SuppressWarnings("serial")
11-
public final class AddFlagRegex extends GridBagJDialog<String>{
11+
public class AddFlagRegex extends GridBagJDialog<String>{
1212
private JTextField regexPatternField;
1313
private JList<String> flagPatternList;
1414
private int selectedIndex = -1;
1515
private CustomScanMainPanel mainPanel;
1616

17+
/**
18+
* default package private constructor
19+
* this means that this class can be instantiated only in this package.
20+
*
21+
* @param mainPanel
22+
* @param title
23+
* @param modarityType
24+
*/
1725
AddFlagRegex(CustomScanMainPanel mainPanel, String title, ModalityType modarityType) {
1826
super(SwingUtilities.windowForComponent(mainPanel), title, modarityType, null, GridBagConstraints.HORIZONTAL, GridBagConstraints.NORTHEAST);
1927
postSuper(null);
2028
this.mainPanel = mainPanel;
2129
}
2230

31+
/**
32+
* default package private constructor
33+
* this means that this class can be instantiated only in this package.
34+
*
35+
* @param dialog
36+
* @param mainPanel
37+
* @param title
38+
* @param modarityType
39+
*/
2340
AddFlagRegex(Dialog dialog, CustomScanMainPanel mainPanel, String title, ModalityType modarityType) {
2441
super(dialog, mainPanel, title, modarityType, null, GridBagConstraints.HORIZONTAL, GridBagConstraints.NORTHEAST);
2542
postSuper(null);

addOns/customactivescan/src/main/java/org/zaproxy/zap/extension/customactivescan/view/AddRuleDialog.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import java.awt.event.ItemEvent;
1111

1212
@SuppressWarnings("serial")
13-
public final class AddRuleDialog extends GridBagJDialog<String> {
13+
public class AddRuleDialog extends GridBagJDialog<String> {
1414

1515
private final static org.apache.logging.log4j.Logger LOGGER4J =
1616
org.apache.logging.log4j.LogManager.getLogger();
@@ -20,7 +20,14 @@ public final class AddRuleDialog extends GridBagJDialog<String> {
2020
JComboBox<String> ruleComboBox;
2121
JCheckBox scanLogCheckBox;
2222

23-
23+
/**
24+
* default package private constructor
25+
* this means that this class can be instantiated only in this package.
26+
*
27+
* @param mainPanel
28+
* @param title
29+
* @param modalityType
30+
*/
2431
AddRuleDialog(CustomScanMainPanel mainPanel, String title, ModalityType modalityType) {
2532
super(SwingUtilities.windowForComponent(mainPanel), title, modalityType, null, GridBagConstraints.HORIZONTAL);
2633
postSuper(null);

0 commit comments

Comments
 (0)