Source:
private boolean scanSingleNode(Plugin plugin, StructuralNode node) { Thread thread; Plugin test; HttpMessage msg; log.debug("scanSingleNode node plugin=" + plugin.getName() + " node=" + node.getName()); try { if (node == null || node.getHistoryReference() == null) { log.debug("scanSingleNode node or href null, returning: node=" + node); return false; } if (HistoryReference.TYPE_SCANNER == node.getHistoryReference().getHistoryType()) { log.debug("Ignoring \"scanner\" type href"); return false; } if (!nodeInScope(node.getName())) { log.debug("scanSingleNode node not in scope"); return false; } msg = node.getHistoryReference().getHttpMessage(); if (msg == null) { log.debug("scanSingleNode msg null"); return false; } test = plugin.getClass().newInstance(); test.setConfig(plugin.getConfig()); FileConfiguration confFile = Model.getSingleton().getOptionsParam().getConfig(); Iterator<String> iter = confFile.getKeys("rules."); while (iter.hasNext()) { String key = iter.next(); test.getConfig().setProperty(key, confFile.getProperty(key)); } test.setDelayInMs(plugin.getDelayInMs()); test.setDefaultAlertThreshold(plugin.getAlertThreshold()); test.setDefaultAttackStrength(plugin.getAttackStrength()); test.setTechSet(getTechSet()); test.init(msg, this); notifyHostProgress(plugin.getName() + ": " + msg.getRequestHeader().getURI().toString()); } catch (Exception e) { log.error(e.getMessage() + " " + node.getName(), e); return false; } do { if (this.isStop()) { return false; } thread = threadPool.getFreeThreadAndRun(test); if (thread == null) { Util.sleep(200); } } while (thread == null); mapPluginStats.get(plugin.getId()).incProgress(); return true; }

Target:
private boolean scanSingleNode(Plugin plugin, StructuralNode node) { Thread thread; Plugin test; HttpMessage msg; log.debug("scanSingleNode node plugin=" + plugin.getName() + " node=" + node.getName()); try { if (node == null || node.getHistoryReference() == null) { log.debug("scanSingleNode node or href null, returning: node=" + node); return false; } if (HistoryReference.TYPE_SCANNER == node.getHistoryReference().getHistoryType()) { log.debug("Ignoring \"scanner\" type href"); return false; } if (!nodeInScope(node.getName())) { log.debug("scanSingleNode node not in scope"); return false; } msg = node.getHistoryReference().getHttpMessage(); if (msg == null) { log.debug("scanSingleNode msg null"); return false; } test = plugin.getClass().newInstance(); test.setConfig(plugin.getConfig()); if (this.ruleConfigParam != null) { for (RuleConfig rc : this.ruleConfigParam.getAllRuleConfigs()) { test.getConfig().setProperty(rc.getKey(), rc.getValue()); } } test.setDelayInMs(plugin.getDelayInMs()); test.setDefaultAlertThreshold(plugin.getAlertThreshold()); test.setDefaultAttackStrength(plugin.getAttackStrength()); test.setTechSet(getTechSet()); test.init(msg, this); notifyHostProgress(plugin.getName() + ": " + msg.getRequestHeader().getURI().toString()); } catch (Exception e) { log.error(e.getMessage() + " " + node.getName(), e); return false; } do { if (this.isStop()) { return false; } thread = threadPool.getFreeThreadAndRun(test); if (thread == null) { Util.sleep(200); } } while (thread == null); mapPluginStats.get(plugin.getId()).incProgress(); return true; }