Skip to content

Commit

Permalink
pscan: set config always to the scan rules
Browse files Browse the repository at this point in the history
Move the view check to the correct place to set the config to the scan
rules always (headless and GUI).

Signed-off-by: thc202 <thc202@gmail.com>
  • Loading branch information
thc202 committed Nov 21, 2024
1 parent bbb1684 commit 5bfa5b5
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,16 @@ public ExtensionPassiveScan2() {
PassiveScanner scanner = (PassiveScanner) args[0];
try {
boolean added = scanRuleManager.add(scanner);
if (added
&& hasView()
&& scanner instanceof PluginPassiveScanner) {
if (added && scanner instanceof PluginPassiveScanner) {
PluginPassiveScanner pps =
(PluginPassiveScanner) scanner;
pps.setConfig(
getModel().getOptionsParam().getConfig());
getPolicyPanel()
.getPassiveScanTableModel()
.addScanner(pps);
if (hasView()) {
getPolicyPanel()
.getPassiveScanTableModel()
.addScanner(pps);
}
}
return added;

Expand Down

0 comments on commit 5bfa5b5

Please sign in to comment.