use of org.parosproxy.paros.extension.ExtensionLoader in project zaproxy by zaproxy.
the class ExtensionManualRequestEditor method removeManualSendEditor.
public void removeManualSendEditor(Class<? extends Message> messageType) {
// remove from list
ManualRequestEditorDialog dialogue = dialogues.remove(messageType);
if (dialogue != null) {
// remove from GUI
dialogue.clear();
dialogue.dispose();
if (getView() != null) {
// unload menu items
ExtensionLoader extLoader = Control.getSingleton().getExtensionLoader();
extLoader.removeToolsMenuItem(dialogue.getMenuItem());
}
}
}
use of org.parosproxy.paros.extension.ExtensionLoader in project zaproxy by zaproxy.
the class ReportLastScan method getExtensionsXML.
public StringBuilder getExtensionsXML(SiteNode site) {
StringBuilder extensionXml = new StringBuilder();
ExtensionLoader loader = Control.getSingleton().getExtensionLoader();
int extensionCount = loader.getExtensionCount();
for (int i = 0; i < extensionCount; i++) {
Extension extension = loader.getExtension(i);
if (extension instanceof XmlReporterExtension) {
extensionXml.append(((XmlReporterExtension) extension).getXml(site));
}
}
return extensionXml;
}
use of org.parosproxy.paros.extension.ExtensionLoader 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 = (ExtensionPassiveScan) Control.getSingleton().getExtensionLoader().getExtension(ExtensionPassiveScan.NAME);
if (extensionPassiveScan != null) {
paramScanner = new ParamScanner(this);
extensionPassiveScan.addPassiveScanner(new ParamScanner(this));
}
}
Aggregations