Search in sources :

Example 16 with OptionsParam

use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.

the class OptionsSpiderPanel method saveParam.

@Override
public void saveParam(Object obj) throws Exception {
    OptionsParam options = (OptionsParam) obj;
    SpiderParam param = options.getParamSet(SpiderParam.class);
    param.setMaxDepth(getSliderMaxDepth().getValue());
    param.setThreadCount(getSliderThreads().getValue());
    param.setMaxDuration(getDurationNumberSpinner().getValue());
    param.setMaxChildren(getMaxChildrenNumberSpinner().getValue());
    param.setDomainsAlwaysInScope(getDomainsAlwaysInScopeTableModel().getDomainsAlwaysInScope());
    param.setConfirmRemoveDomainAlwaysInScope(getDomainsAlwaysInScopePanel().isRemoveWithoutConfirmation());
    param.setSendRefererHeader(getChkSendRefererHeader().isSelected());
    param.setProcessForm(getChkProcessForm().isSelected());
    param.setPostForm(getChkPostForm().isSelected());
    param.setParseComments(getChkParseComments().isSelected());
    param.setParseRobotsTxt(getChkParseRobotsTxt().isSelected());
    param.setParseSitemapXml(getChkParseSitemapXml().isSelected());
    param.setParseSVNEntries(getChkParseSVNEntries().isSelected());
    param.setParseGit(getChkParseGit().isSelected());
    param.setHandleParameters((HandleParametersOption) getComboHandleParameters().getSelectedItem());
    param.setHandleODataParametersVisited(getHandleODataSpecificParameters().isSelected());
}
Also used : OptionsParam(org.parosproxy.paros.model.OptionsParam) SpiderParam(org.zaproxy.zap.spider.SpiderParam)

Example 17 with OptionsParam

use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.

the class OptionsGlobalExcludeURLPanel method saveParam.

@Override
public void saveParam(Object obj) throws Exception {
    OptionsParam optionsParam = (OptionsParam) obj;
    GlobalExcludeURLParam globalExcludeURLParam = optionsParam.getGlobalExcludeURLParam();
    globalExcludeURLParam.setTokens(getGlobalExcludeURLModel().getElements());
    globalExcludeURLParam.setConfirmRemoveToken(!tokensOptionsPanel.isRemoveWithoutConfirmation());
}
Also used : OptionsParam(org.parosproxy.paros.model.OptionsParam)

Example 18 with OptionsParam

use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.

the class OptionsPassiveScan method saveParam.

@Override
public void saveParam(Object obj) throws Exception {
    OptionsParam optionsParam = (OptionsParam) obj;
    PassiveScanParam passiveScanParam = optionsParam.getParamSet(PassiveScanParam.class);
    passiveScanParam.setAutoTagScanners(getTableModel().getElements());
    passiveScanParam.setConfirmRemoveAutoTagScanner(!scannersOptionsPanel.isRemoveWithoutConfirmation());
    passiveScanners.setAutoTagScanners(passiveScanParam.getAutoTagScanners());
}
Also used : OptionsParam(org.parosproxy.paros.model.OptionsParam)

Example 19 with OptionsParam

use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.

the class OptionsHttpSessionsPanel method saveParam.

@Override
public void saveParam(Object obj) throws Exception {
    OptionsParam optionsParam = (OptionsParam) obj;
    HttpSessionsParam sessionParam = optionsParam.getParamSet(HttpSessionsParam.class);
    sessionParam.setDefaultTokens(getDefaultTokensModel().getTokens());
    sessionParam.setEnabledProxyOnly(getChkProxyOnly().isSelected());
    sessionParam.setConfirmRemoveDefaultToken(!tokensOptionsPanel.isRemoveWithoutConfirmation());
}
Also used : OptionsParam(org.parosproxy.paros.model.OptionsParam)

Example 20 with OptionsParam

use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.

the class OptionsStatsPanel method saveParam.

@Override
public void saveParam(Object obj) throws Exception {
    OptionsParam optionsParam = (OptionsParam) obj;
    StatsParam statsParam = optionsParam.getParamSet(StatsParam.class);
    statsParam.setInMemoryEnabled(getInMemoryStatsEnabledField().isSelected());
    if (getStatsdStatsEnabledField().isSelected()) {
        statsParam.setStatsdHost(getStatsdHostField().getText());
        statsParam.setStatsdPort(getStatsdPortField().getValue());
        statsParam.setStatsdPrefix(getStatsdPrefixField().getText());
    } else {
        statsParam.setStatsdHost("");
    }
}
Also used : OptionsParam(org.parosproxy.paros.model.OptionsParam)

Aggregations

OptionsParam (org.parosproxy.paros.model.OptionsParam)56 ScannerParam (org.parosproxy.paros.core.scanner.ScannerParam)4 ConnectionParam (org.parosproxy.paros.network.ConnectionParam)4 File (java.io.File)3 ViewLocale (org.zaproxy.zap.view.ViewLocale)3 ProxyParam (org.parosproxy.paros.core.proxy.ProxyParam)2 Extension (org.parosproxy.paros.extension.Extension)2 SpiderParam (org.zaproxy.zap.spider.SpiderParam)2 HeadlessException (java.awt.HeadlessException)1 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 HashMap (java.util.HashMap)1 MissingResourceException (java.util.MissingResourceException)1 JButton (javax.swing.JButton)1 UnsupportedLookAndFeelException (javax.swing.UnsupportedLookAndFeelException)1 ConfigurationException (org.apache.commons.configuration.ConfigurationException)1 JXErrorPane (org.jdesktop.swingx.JXErrorPane)1 ErrorInfo (org.jdesktop.swingx.error.ErrorInfo)1