use of org.zaproxy.zap.extension.pscan.ExtensionPassiveScan in project zaproxy by zaproxy.
the class AddOnInstaller method installAddOnPassiveScanRules.
private static void installAddOnPassiveScanRules(AddOn addOn, AddOnClassLoader addOnClassLoader) {
List<PluginPassiveScanner> pscanrules = AddOnLoaderUtils.getPassiveScanRules(addOn, addOnClassLoader);
ExtensionPassiveScan extPscan = Control.getSingleton().getExtensionLoader().getExtension(ExtensionPassiveScan.class);
if (!pscanrules.isEmpty() && extPscan != null) {
for (PluginPassiveScanner pscanrule : pscanrules) {
String name = pscanrule.getClass().getCanonicalName();
logger.debug("Install pscanrule: " + name);
if (!extPscan.addPassiveScanner(pscanrule)) {
logger.error("Failed to install pscanrule: " + name);
}
}
}
}
use of org.zaproxy.zap.extension.pscan.ExtensionPassiveScan in project zaproxy by zaproxy.
the class ExtensionParams method hook.
@Override
public void hook(ExtensionHook extensionHook) {
super.hook(extensionHook);
extensionHook.addApiImplementor(new ParamsAPI(this));
extensionHook.addSessionListener(this);
extensionHook.addSiteMapListener(this);
if (getView() != null) {
@SuppressWarnings("unused") ExtensionHookView pv = extensionHook.getHookView();
extensionHook.getHookView().addStatusPanel(getParamsPanel());
final ExtensionLoader extLoader = Control.getSingleton().getExtensionLoader();
if (extLoader.isExtensionEnabled(ExtensionSearch.NAME)) {
extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuParamSearch());
}
if (extLoader.isExtensionEnabled(ExtensionAntiCSRF.NAME)) {
extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuAddAntiCSRF());
extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuRemoveAntiCSRF());
}
if (extLoader.isExtensionEnabled(ExtensionHttpSessions.NAME)) {
extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuAddSession());
extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuRemoveSession());
}
ExtensionHelp.enableHelpKey(getParamsPanel(), "ui.tabs.params");
}
ExtensionPassiveScan extensionPassiveScan = Control.getSingleton().getExtensionLoader().getExtension(ExtensionPassiveScan.class);
if (extensionPassiveScan != null) {
paramScanner = new ParamScanner(this);
extensionPassiveScan.addPassiveScanner(new ParamScanner(this));
}
}
Aggregations