Search in sources :

Example 26 with OptionsParam

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

the class OptionsLangPanel method saveParam.

@Override
public void saveParam(Object obj) throws Exception {
    OptionsParam options = (OptionsParam) obj;
    ViewLocale selectedLocale = (ViewLocale) localeSelect.getSelectedItem();
    if (selectedLocale != null) {
        options.getViewParam().setLocale(selectedLocale.getLocale());
    }
}
Also used : OptionsParam(org.parosproxy.paros.model.OptionsParam) ViewLocale(org.zaproxy.zap.view.ViewLocale)

Example 27 with OptionsParam

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

the class OptionsLangPanel method initParam.

@Override
public void initParam(Object obj) {
    OptionsParam options = (OptionsParam) obj;
    ViewLocale locale = LocaleUtils.getViewLocale(options.getViewParam().getLocale());
    localeSelect.setSelectedItem(locale);
}
Also used : OptionsParam(org.parosproxy.paros.model.OptionsParam) ViewLocale(org.zaproxy.zap.view.ViewLocale)

Example 28 with OptionsParam

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

the class OptionsLocalePanel method saveParam.

@Override
public void saveParam(Object obj) throws Exception {
    OptionsParam options = (OptionsParam) obj;
    ViewLocale selectedLocale = (ViewLocale) localeSelect.getSelectedItem();
    if (selectedLocale != null) {
        options.getViewParam().setLocale(selectedLocale.getLocale());
    }
}
Also used : OptionsParam(org.parosproxy.paros.model.OptionsParam) ViewLocale(org.zaproxy.zap.view.ViewLocale)

Example 29 with OptionsParam

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

the class OptionsScannerPanel method initParam.

@Override
public void initParam(Object obj) {
    OptionsParam options = (OptionsParam) obj;
    ScannerParam param = options.getParamSet(ScannerParam.class);
    getSliderHostPerScan().setValue(param.getHostPerScan());
    getSliderThreadsPerHost().setValue(param.getThreadPerHost());
    getSliderDelayInMs().setValue(param.getDelayInMs());
    setLabelDelayInMsValue(param.getDelayInMs());
    getSpinnerMaxResultsList().setValue(param.getMaxResultsToList());
    getSpinnerMaxRuleDuration().setValue(param.getMaxRuleDurationInMins());
    getSpinnerMaxScanDuration().setValue(param.getMaxScanDurationInMins());
    getChkInjectPluginIdInHeader().setSelected(param.isInjectPluginIdInHeader());
    getChkHandleAntiCSRFTokens().setSelected(param.getHandleAntiCSRFTokens());
    getChkPromptInAttackMode().setSelected(param.isPromptInAttackMode());
    getChkRescanInAttackMode().setSelected(param.isRescanInAttackMode());
    getChkRescanInAttackMode().setEnabled(!getChkPromptInAttackMode().isSelected());
    initPolicyPulldowns();
    getDefaultAscanPolicyPulldown().setSelectedItem(param.getDefaultPolicy());
    getDefaultAttackPolicyPulldown().setSelectedItem(param.getAttackPolicy());
    getAllowAttackModeOnStart().setSelected(param.isAllowAttackOnStart());
    getSpinnerMaxChartTime().setValue(param.getMaxChartTimeInMins());
}
Also used : OptionsParam(org.parosproxy.paros.model.OptionsParam) ScannerParam(org.parosproxy.paros.core.scanner.ScannerParam)

Example 30 with OptionsParam

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

the class OptionsScannerPanel method saveParam.

@Override
public void saveParam(Object obj) throws Exception {
    OptionsParam options = (OptionsParam) obj;
    ScannerParam param = options.getParamSet(ScannerParam.class);
    param.setHostPerScan(getSliderHostPerScan().getValue());
    param.setThreadPerHost(getSliderThreadsPerHost().getValue());
    param.setDelayInMs(getDelayInMs());
    param.setMaxResultsToList(this.getSpinnerMaxResultsList().getValue());
    param.setMaxRuleDurationInMins(this.getSpinnerMaxRuleDuration().getValue());
    param.setMaxScanDurationInMins(this.getSpinnerMaxScanDuration().getValue());
    param.setInjectPluginIdInHeader(getChkInjectPluginIdInHeader().isSelected());
    param.setHandleAntiCSRFTokens(getChkHandleAntiCSRFTokens().isSelected());
    param.setPromptInAttackMode(getChkPromptInAttackMode().isSelected());
    param.setRescanInAttackMode(getChkRescanInAttackMode().isSelected());
    param.setDefaultPolicy((String) this.getDefaultAscanPolicyPulldown().getSelectedItem());
    param.setAttackPolicy((String) this.getDefaultAttackPolicyPulldown().getSelectedItem());
    param.setAllowAttackOnStart(this.getAllowAttackModeOnStart().isSelected());
    param.setMaxChartTimeInMins(this.getSpinnerMaxChartTime().getValue());
}
Also used : OptionsParam(org.parosproxy.paros.model.OptionsParam) ScannerParam(org.parosproxy.paros.core.scanner.ScannerParam)

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