Search in sources :

Example 26 with JCheckBox

use of javax.swing.JCheckBox in project zaproxy by zaproxy.

the class OptionsScannerPanel method getChkInjectPluginIdInHeader.

private JCheckBox getChkInjectPluginIdInHeader() {
    if (chkInjectPluginIdInHeader == null) {
        chkInjectPluginIdInHeader = new JCheckBox();
        chkInjectPluginIdInHeader.setText(Constant.messages.getString("ascan.options.pluginHeader.label"));
    }
    return chkInjectPluginIdInHeader;
}
Also used : JCheckBox(javax.swing.JCheckBox)

Example 27 with JCheckBox

use of javax.swing.JCheckBox in project zaproxy by zaproxy.

the class OptionsScannerPanel method getChkPromptInAttackMode.

private JCheckBox getChkPromptInAttackMode() {
    if (chkPromptInAttackMode == null) {
        chkPromptInAttackMode = new JCheckBox(Constant.messages.getString("ascan.options.attackPrompt.label"));
        chkPromptInAttackMode.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                getChkRescanInAttackMode().setEnabled(!chkPromptInAttackMode.isSelected());
            }
        });
    }
    return chkPromptInAttackMode;
}
Also used : JCheckBox(javax.swing.JCheckBox) ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent)

Example 28 with JCheckBox

use of javax.swing.JCheckBox in project zaproxy by zaproxy.

the class CustomScanDialog method populateRequestField.

private void populateRequestField(SiteNode node) {
    try {
        if (node == null || node.getHistoryReference() == null || node.getHistoryReference().getHttpMessage() == null) {
            this.getRequestField().setText("");
        } else {
            // Populate the custom vectors http pane
            HttpMessage msg = node.getHistoryReference().getHttpMessage();
            String header = msg.getRequestHeader().toString();
            StringBuilder sb = new StringBuilder();
            sb.append(header);
            this.headerLength = header.length();
            // Ignore <METHOD> http(s)://host:port/
            this.urlPathStart = header.indexOf("/", header.indexOf("://") + 2) + 1;
            sb.append(msg.getRequestBody().toString());
            this.getRequestField().setText(sb.toString());
            // Only set the recurse option if the node has children, and disable it otherwise
            JCheckBox recurseChk = (JCheckBox) this.getField(FIELD_RECURSE);
            recurseChk.setEnabled(node.getChildCount() > 0);
            recurseChk.setSelected(node.getChildCount() > 0);
        }
        this.setFieldStates();
    } catch (HttpMalformedHeaderException | DatabaseException e) {
        // 
        this.getRequestField().setText("");
    }
}
Also used : JCheckBox(javax.swing.JCheckBox) HttpMalformedHeaderException(org.parosproxy.paros.network.HttpMalformedHeaderException) HttpMessage(org.parosproxy.paros.network.HttpMessage) DatabaseException(org.parosproxy.paros.db.DatabaseException)

Example 29 with JCheckBox

use of javax.swing.JCheckBox in project zaproxy by zaproxy.

the class OptionsVariantPanel method getChkRPCXML.

private JCheckBox getChkRPCXML() {
    if (chkRPCXML == null) {
        chkRPCXML = new JCheckBox();
        chkRPCXML.setText(Constant.messages.getString("variant.options.rpc.xml.label"));
    }
    return chkRPCXML;
}
Also used : JCheckBox(javax.swing.JCheckBox)

Example 30 with JCheckBox

use of javax.swing.JCheckBox in project zaproxy by zaproxy.

the class OptionsVariantPanel method getChkInjectableHeadersAllRequests.

private JCheckBox getChkInjectableHeadersAllRequests() {
    if (chkInjectableHeadersAllRequests == null) {
        chkInjectableHeadersAllRequests = new JCheckBox();
        chkInjectableHeadersAllRequests.setText(Constant.messages.getString("variant.options.injectable.headersAllRequests.label"));
        chkInjectableHeadersAllRequests.setToolTipText(Constant.messages.getString("variant.options.injectable.headersAllRequests.toolTip"));
    }
    return chkInjectableHeadersAllRequests;
}
Also used : JCheckBox(javax.swing.JCheckBox)

Aggregations

JCheckBox (javax.swing.JCheckBox)372 JPanel (javax.swing.JPanel)146 JLabel (javax.swing.JLabel)112 JButton (javax.swing.JButton)92 ActionEvent (java.awt.event.ActionEvent)71 ActionListener (java.awt.event.ActionListener)66 JTextField (javax.swing.JTextField)57 BorderLayout (java.awt.BorderLayout)52 GridBagConstraints (java.awt.GridBagConstraints)42 BoxLayout (javax.swing.BoxLayout)42 GridBagLayout (java.awt.GridBagLayout)39 Dimension (java.awt.Dimension)33 FlowLayout (java.awt.FlowLayout)31 Insets (java.awt.Insets)31 JScrollPane (javax.swing.JScrollPane)30 JRadioButton (javax.swing.JRadioButton)29 ItemEvent (java.awt.event.ItemEvent)26 ButtonGroup (javax.swing.ButtonGroup)25 ItemListener (java.awt.event.ItemListener)23 JComboBox (javax.swing.JComboBox)23