use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class View method init.
// ZAP: Removed method changeDisplayOption(int)
public void init() {
OptionsParam options = Model.getSingleton().getOptionsParam();
mainFrame = new MainFrame(options, getRequestPanel(), getResponsePanel());
mainFrame.getWorkbench().addPanel(View.getSingleton().getSiteTreePanel(), WorkbenchPanel.PanelType.SELECT);
// Install default editor and renderer for TextMessageLocationHighlight
MessageLocationHighlightRenderersEditors.getInstance().addEditor(TextMessageLocationHighlight.class, new TextMessageLocationHighlightEditor());
MessageLocationHighlightRenderersEditors.getInstance().addRenderer(TextMessageLocationHighlight.class, new TextMessageLocationHighlightRenderer());
String statusString;
for (Status status : AddOn.Status.values()) {
//Try/catch in case AddOn.Status gets out of sync with cfu.status i18n entries
try {
statusString = Constant.messages.getString("cfu.status." + status.toString());
} catch (MissingResourceException mre) {
statusString = status.toString();
String errString = "Caught " + mre.getClass().getName() + " " + mre.getMessage() + " when looking for i18n string: cfu.status." + statusString;
if (Constant.isDevBuild()) {
logger.error(errString);
} else {
logger.warn(errString);
}
}
statusMap.put(status, new StatusUI(status, statusString));
}
}
use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsSpiderPanel method initParam.
@Override
public void initParam(Object obj) {
OptionsParam options = (OptionsParam) obj;
SpiderParam param = options.getParamSet(SpiderParam.class);
getSliderMaxDepth().setValue(param.getMaxDepth());
getSliderThreads().setValue(param.getThreadCount());
getDurationNumberSpinner().setValue(param.getMaxDuration());
getMaxChildrenNumberSpinner().setValue(param.getMaxChildren());
getDomainsAlwaysInScopeTableModel().setDomainsAlwaysInScope(param.getDomainsAlwaysInScope());
getDomainsAlwaysInScopePanel().setRemoveWithoutConfirmation(param.isConfirmRemoveDomainAlwaysInScope());
getChkProcessForm().setSelected(param.isProcessForm());
getChkSendRefererHeader().setSelected(param.isSendRefererHeader());
getChkPostForm().setSelected(param.isPostForm());
getChkParseComments().setSelected(param.isParseComments());
getChkParseRobotsTxt().setSelected(param.isParseRobotsTxt());
getChkParseSitemapXml().setSelected(param.isParseSitemapXml());
getChkParseSVNEntries().setSelected(param.isParseSVNEntries());
getChkParseGit().setSelected(param.isParseGit());
getComboHandleParameters().setSelectedItem(param.getHandleParameters());
getHandleODataSpecificParameters().setSelected(param.isHandleODataParametersVisited());
}
use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsDatabasePanel method initParam.
@Override
public void initParam(Object obj) {
final OptionsParam options = (OptionsParam) obj;
final DatabaseParam param = options.getDatabaseParam();
checkBoxCompactDatabase.setSelected(param.isCompactDatabase());
spinnerRequestBodySize.setValue(param.getRequestBodySize());
spinnerResponseBodySize.setValue(param.getResponseBodySize());
checkBoxNewSessionPrompt.setSelected(param.isNewSessionPrompt());
comboNewSessionOption.setSelectedIndex(param.getNewSessionOption());
checkBoxRecoveryLog.setSelected(param.isRecoveryLogEnabled());
}
use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsLocalProxyPanel method initParam.
@Override
public void initParam(Object obj) {
OptionsParam optionsParam = (OptionsParam) obj;
ProxyParam proxyParam = optionsParam.getProxyParam();
// set Local Proxy parameters
// ZAP: in the Options dialog we can show the real value of the field
// and null means that the listener should be bound to all interfaces
txtProxyIp.setText(proxyParam.getRawProxyIP());
txtProxyIp.discardAllEdits();
// ZAP: Do not allow invalid port numbers
spinnerProxyPort.setValue(proxyParam.getProxyPort());
chkRemoveUnsupportedEncodings.setSelected(proxyParam.isRemoveUnsupportedEncodings());
chkAlwaysDecodeGzip.setSelected(proxyParam.isAlwaysDecodeGzip());
// set reverse proxy param
txtReverseProxyIp.setText(proxyParam.getReverseProxyIp());
txtReverseProxyIp.discardAllEdits();
// ZAP: Do not allow invalid port numbers
spinnerReverseProxyHttpPort.setValue(proxyParam.getReverseProxyHttpPort());
spinnerReverseProxyHttpsPort.setValue(proxyParam.getReverseProxyHttpsPort());
chkReverseProxy.setSelected(proxyParam.isUseReverseProxy());
setReverseProxyEnabled(proxyParam.isUseReverseProxy());
securityProtocolsPanel.setSecurityProtocolsEnabled(proxyParam.getSecurityProtocolsEnabled());
}
use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsConnectionPanel method initParam.
@Override
public void initParam(Object obj) {
OptionsParam optionsParam = (OptionsParam) obj;
ConnectionParam connectionParam = optionsParam.getConnectionParam();
this.txtTimeoutInSecs.setText(Integer.toString(connectionParam.getTimeoutInSecs()));
txtTimeoutInSecs.discardAllEdits();
checkBoxSingleCookieRequestHeader.setSelected(connectionParam.isSingleCookieRequestHeader());
getProxyExcludedDomainsTableModel().setExcludedDomains(connectionParam.getProxyExcludedDomains());
getProxyExcludedDomainsPanel().setRemoveWithoutConfirmation(!connectionParam.isConfirmRemoveProxyExcludedDomain());
chkUseProxyChain.setSelected(connectionParam.isUseProxyChain());
// set Proxy Chain parameters
txtProxyChainName.setText(connectionParam.getProxyChainName());
txtProxyChainName.discardAllEdits();
// ZAP: Do not allow invalid port numbers
spinnerProxyChainPort.setValue(connectionParam.getProxyChainPort());
chkProxyChainAuth.setSelected(connectionParam.isUseProxyChainAuth());
txtProxyChainRealm.setText(connectionParam.getProxyChainRealm());
txtProxyChainRealm.discardAllEdits();
txtProxyChainUserName.setText(connectionParam.getProxyChainUserName());
txtProxyChainUserName.discardAllEdits();
chkProxyChainPrompt.setSelected(connectionParam.isProxyChainPrompt());
//Default don't show (everytime)
chkShowPassword.setSelected(false);
//Default mask (everytime)
txtProxyChainPassword.setEchoChar('*');
setProxyChainEnabled(connectionParam.isUseProxyChain());
if (!connectionParam.isProxyChainPrompt()) {
txtProxyChainPassword.setText(connectionParam.getProxyChainPassword());
}
dnsTtlSuccessfulQueriesNumberSpinner.setValue(connectionParam.getDnsTtlSuccessfulQueries());
securityProtocolsPanel.setSecurityProtocolsEnabled(connectionParam.getSecurityProtocolsEnabled());
defaultUserAgent.setText(connectionParam.getDefaultUserAgent());
setUaFromString();
}
Aggregations