Skip to content

Commit d2667fb

Browse files
committed
Update pscan rule handling
Signed-off-by: kingthorin <[email protected]>
1 parent 7ab1a16 commit d2667fb

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

standalone/alertAndPluginDetails.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Output sample:
2-
* Alert_Name Source:PluginName WASC CWE
3-
* Cross Site Scripting (DOM Based) ACTIVE:Cross Site Scripting (DOM Based) 8 79
4-
* Non-Storable Content PASSIVE:Content Cacheability 13 524
2+
* Alert_Name Source:PluginName WASC CWE
3+
* Cross Site Scripting (DOM Based) ACTIVE:Cross Site Scripting (DOM Based) 8 79
4+
* Non-Storable Content PASSIVE:Content Cacheability 13 524
55
* It's tab separated so you can simply copy/paste it into Excel (or whatever).
66
*/
77

@@ -11,7 +11,7 @@ extAlert = control
1111

1212
extPscan = control
1313
.getExtensionLoader()
14-
.getExtension(org.zaproxy.zap.extension.pscan.ExtensionPassiveScan.NAME);
14+
.getExtension(org.zaproxy.addon.pscan.ExtensionPassiveScan2.NAME);
1515

1616
var pf = Java.type("org.parosproxy.paros.core.scanner.PluginFactory");
1717

@@ -43,7 +43,9 @@ function printAlert(alert) {
4343
}
4444
}
4545
if (alert.getSource() == Alert.Source.PASSIVE && extPscan != null) {
46-
plugin = extPscan.getPluginPassiveScanner(alert.getPluginId());
46+
plugin = extPscan
47+
.getPassiveScannersManager()
48+
.getScanRule(alert.getPluginId());
4749
if (plugin != null) {
4850
scanner = plugin.getName();
4951
}

standalone/scan_rule_list.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ for (var i = 0; i < plugins.length; i++) {
2929

3030
extPscan = control
3131
.getExtensionLoader()
32-
.getExtension(org.zaproxy.zap.extension.pscan.ExtensionPassiveScan.NAME);
32+
.getExtension(org.zaproxy.addon.pscan.ExtensionPassiveScan2.NAME);
3333

34-
plugins = extPscan.getPluginPassiveScanners().toArray();
34+
plugins = extPscan.getPassiveScannersManager().getScanRules();
3535

3636
for (var i = 0; i < plugins.length; i++) {
3737
try {

0 commit comments

Comments
 (0)