Search in sources :

Example 36 with OptionsParam

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

the class OptionsExtensionPanel method initParam.

@Override
public void initParam(Object obj) {
    OptionsParam optionsParam = (OptionsParam) obj;
    ExtensionParam extParam = optionsParam.getExtensionParam();
    List<Extension> exts = extensionModel.getExtensions();
    for (Extension ext : exts) {
        ext.setEnabled(extParam.isExtensionEnabled(ext.getName()));
    }
    extensionModel.fireTableRowsUpdated(0, extensionModel.getRowCount());
}
Also used : Extension(org.parosproxy.paros.extension.Extension) OptionsParam(org.parosproxy.paros.model.OptionsParam)

Example 37 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 38 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)

Example 39 with OptionsParam

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

the class OptionsVariantPanel method saveParam.

@Override
public void saveParam(Object obj) throws Exception {
    OptionsParam options = (OptionsParam) obj;
    ScannerParam param = options.getParamSet(ScannerParam.class);
    saveParam(param);
}
Also used : OptionsParam(org.parosproxy.paros.model.OptionsParam) ScannerParam(org.parosproxy.paros.core.scanner.ScannerParam)

Example 40 with OptionsParam

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

the class OptionsVariantPanel method initParam.

@Override
public void initParam(Object obj) {
    OptionsParam options = (OptionsParam) obj;
    ScannerParam param = options.getParamSet(ScannerParam.class);
    initParam(param);
}
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