Search in sources :

Example 41 with OptionsParam

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();
    // set Proxy Chain parameters
    txtProxyChainRealm.setText(connectionParam.getProxyChainRealm());
    txtProxyChainRealm.discardAllEdits();
    txtProxyChainUserName.setText(connectionParam.getProxyChainUserName());
    txtProxyChainUserName.discardAllEdits();
    //Default don't show (everytime)
    chkShowPassword.setSelected(false);
    //Default mask (everytime)
    txtProxyChainPassword.setEchoChar('*');
    this.proxyDialog.pack();
}
Also used : OptionsParam(org.parosproxy.paros.model.OptionsParam) ConnectionParam(org.parosproxy.paros.network.ConnectionParam)

Example 42 with OptionsParam

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

the class OptionsConnectionPanel method saveParam.

@Override
public void saveParam(Object obj) throws Exception {
    OptionsParam optionsParam = (OptionsParam) obj;
    ConnectionParam connectionParam = optionsParam.getConnectionParam();
    connectionParam.setProxyChainRealm(txtProxyChainRealm.getText());
    connectionParam.setProxyChainUserName(txtProxyChainUserName.getText());
    // Make sure this isnt saved in the config file
    connectionParam.setProxyChainPassword(new String(txtProxyChainPassword.getPassword()), false);
}
Also used : OptionsParam(org.parosproxy.paros.model.OptionsParam) ConnectionParam(org.parosproxy.paros.network.ConnectionParam)

Example 43 with OptionsParam

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

the class OptionsAntiCsrfPanel method saveParam.

@Override
public void saveParam(Object obj) throws Exception {
    OptionsParam optionsParam = (OptionsParam) obj;
    AntiCsrfParam antiCsrfParam = optionsParam.getAntiCsrfParam();
    antiCsrfParam.setTokens(getAntiCsrfModel().getElements());
    antiCsrfParam.setConfirmRemoveToken(!tokensOptionsPanel.isRemoveWithoutConfirmation());
}
Also used : OptionsParam(org.parosproxy.paros.model.OptionsParam)

Example 44 with OptionsParam

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

the class OptionsAntiCsrfPanel method initParam.

@Override
public void initParam(Object obj) {
    OptionsParam optionsParam = (OptionsParam) obj;
    AntiCsrfParam param = optionsParam.getAntiCsrfParam();
    getAntiCsrfModel().setTokens(param.getTokens());
    tokensOptionsPanel.setRemoveWithoutConfirmation(!param.isConfirmRemoveToken());
}
Also used : OptionsParam(org.parosproxy.paros.model.OptionsParam)

Example 45 with OptionsParam

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

the class OptionsApiPanel method initParam.

/*
	public JCheckBox getChkPostActions() {
		if (chkPostActions == null) {
			chkPostActions = new JCheckBox();
			chkPostActions.setText(Constant.messages.getString("api.options.postactions"));
			chkPostActions.setVerticalAlignment(javax.swing.SwingConstants.TOP);
			chkPostActions.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
		}
		return chkPostActions;
	}
	*/
@Override
public void initParam(Object obj) {
    OptionsParam options = (OptionsParam) obj;
    getChkEnabled().setSelected(options.getApiParam().isEnabled());
    getChkUiEnabled().setSelected(options.getApiParam().isUiEnabled());
    getChkSecureOnly().setSelected(options.getApiParam().isSecureOnly());
    getDisableKey().setSelected(options.getApiParam().isDisableKey());
    getIncErrorDetails().setSelected(options.getApiParam().isIncErrorDetails());
    getAutofillKey().setSelected(options.getApiParam().isAutofillKey());
    getEnableJSONP().setSelected(options.getApiParam().isEnableJSONP());
    getReportPermErrors().setSelected(options.getApiParam().isReportPermErrors());
    getNoKeyForSafeOps().setSelected(options.getApiParam().isNoKeyForSafeOps());
    getKeyField().setText(options.getApiParam().getKey());
    //getChkPostActions().setSelected(options.getApiParam().isPostActions());
    getKeyField().setEnabled(!disableKey.isSelected());
    getGenerateKeyButton().setEnabled(!disableKey.isSelected());
    getPermittedAddressesTableModel().setAddresses(options.getApiParam().getPermittedAddresses());
    getProxyPermittedAddressesPanel().setRemoveWithoutConfirmation(!options.getApiParam().isConfirmRemovePermittedAddress());
}
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