Search in sources :

Example 1 with JButtonStateful

use of com.jsql.view.swing.manager.util.JButtonStateful in project jsql-injection by ron190.

the class ManagerBruteForce method initializePanelButton.

private JPanel initializePanelButton() {
    var lastLine = new JPanel();
    lastLine.setOpaque(false);
    lastLine.setLayout(new BoxLayout(lastLine, BoxLayout.X_AXIS));
    lastLine.setPreferredSize(new Dimension(0, 26));
    lastLine.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, UiUtil.COLOR_COMPONENT_BORDER), BorderFactory.createEmptyBorder(1, 0, 1, 1)));
    this.run = new JButtonStateful("BRUTEFORCE_RUN_BUTTON_LABEL");
    I18nViewUtil.addComponentForKey("BRUTEFORCE_RUN_BUTTON_LABEL", this.run);
    this.run.setToolTipText(I18nUtil.valueByKey("BRUTEFORCE_RUN_BUTTON_TOOLTIP"));
    this.run.setName("managerBruterRun");
    this.run.setContentAreaFilled(false);
    this.run.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
    this.run.setBackground(new Color(200, 221, 242));
    this.run.addMouseListener(new FlatButtonMouseAdapter(this.run));
    this.run.addActionListener(new ActionBruteForce(this));
    this.loader = new JLabel(UiUtil.ICON_LOADER_GIF);
    this.loader.setVisible(false);
    lastLine.add(Box.createHorizontalGlue());
    lastLine.add(this.loader);
    lastLine.add(Box.createRigidArea(new Dimension(5, 0)));
    lastLine.add(this.run);
    return lastLine;
}
Also used : JButtonStateful(com.jsql.view.swing.manager.util.JButtonStateful) JPanel(javax.swing.JPanel) ActionBruteForce(com.jsql.view.swing.manager.util.ActionBruteForce) BoxLayout(javax.swing.BoxLayout) Color(java.awt.Color) FlatButtonMouseAdapter(com.jsql.view.swing.ui.FlatButtonMouseAdapter) JLabel(javax.swing.JLabel) Dimension(java.awt.Dimension)

Example 2 with JButtonStateful

use of com.jsql.view.swing.manager.util.JButtonStateful in project jsql-injection by ron190.

the class ManagerAdminPage method initializeRunButton.

private void initializeRunButton() {
    this.defaultText = "ADMIN_PAGE_RUN_BUTTON_LABEL";
    this.run = new JButtonStateful(this.defaultText);
    I18nViewUtil.addComponentForKey("ADMIN_PAGE_RUN_BUTTON_LABEL", this.run);
    this.run.setToolTipText(I18nUtil.valueByKey("ADMIN_PAGE_RUN_BUTTON_TOOLTIP"));
    this.run.setContentAreaFilled(false);
    this.run.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
    this.run.setBackground(new Color(200, 221, 242));
    this.run.addMouseListener(new FlatButtonMouseAdapter(this.run));
    this.run.addActionListener(actionEvent -> this.runSearch());
    this.loader.setVisible(false);
}
Also used : JButtonStateful(com.jsql.view.swing.manager.util.JButtonStateful) Color(java.awt.Color) FlatButtonMouseAdapter(com.jsql.view.swing.ui.FlatButtonMouseAdapter)

Example 3 with JButtonStateful

use of com.jsql.view.swing.manager.util.JButtonStateful in project jsql-injection by ron190.

the class ManagerUpload method initializeRunButton.

private void initializeRunButton(final JTextField shellURL) {
    this.run = new JButtonStateful(this.defaultText);
    I18nViewUtil.addComponentForKey(this.defaultText, this.run);
    this.run.setToolTipText(I18nUtil.valueByKey("UPLOAD_RUN_BUTTON_TOOLTIP"));
    this.run.setEnabled(false);
    this.run.setContentAreaFilled(false);
    this.run.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
    this.run.setBackground(new Color(200, 221, 242));
    this.run.addMouseListener(new FlatButtonMouseAdapter(this.run));
    this.run.addActionListener(actionEvent -> this.initializeRunAction(shellURL));
}
Also used : JButtonStateful(com.jsql.view.swing.manager.util.JButtonStateful) Color(java.awt.Color) FlatButtonMouseAdapter(com.jsql.view.swing.ui.FlatButtonMouseAdapter)

Example 4 with JButtonStateful

use of com.jsql.view.swing.manager.util.JButtonStateful in project jsql-injection by ron190.

the class AbstractManagerShell method initializeRunButtonPanel.

private JPanel initializeRunButtonPanel() {
    this.defaultText = "SHELL_RUN_BUTTON_LABEL";
    var lastLine = new JPanel();
    lastLine.setLayout(new BoxLayout(lastLine, BoxLayout.X_AXIS));
    lastLine.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, UiUtil.COLOR_COMPONENT_BORDER), BorderFactory.createEmptyBorder(1, 0, 1, 1)));
    this.run = new JButtonStateful(this.defaultText);
    I18nViewUtil.addComponentForKey(this.defaultText, this.run);
    this.run.setToolTipText(I18nUtil.valueByKey("SHELL_RUN_BUTTON_TOOLTIP"));
    this.run.setEnabled(false);
    this.run.setContentAreaFilled(false);
    this.run.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
    this.run.setBackground(new Color(200, 221, 242));
    this.run.addMouseListener(new FlatButtonMouseAdapter(this.run));
    this.run.addActionListener(new ActionCreationShell());
    this.privilege = new JLabel(I18nUtil.valueByKey("PRIVILEGE_LABEL"), UiUtil.ICON_SQUARE_GREY, SwingConstants.LEFT);
    I18nViewUtil.addComponentForKey("PRIVILEGE_LABEL", this.privilege);
    this.privilege.setBorder(BorderFactory.createMatteBorder(2, 0, 0, 0, UiUtil.COLOR_DEFAULT_BACKGROUND));
    this.privilege.setToolTipText(I18nUtil.valueByKey("PRIVILEGE_TOOLTIP"));
    lastLine.add(this.privilege);
    lastLine.add(Box.createHorizontalStrut(5));
    lastLine.add(Box.createHorizontalGlue());
    lastLine.add(this.run);
    return lastLine;
}
Also used : JButtonStateful(com.jsql.view.swing.manager.util.JButtonStateful) JPanel(javax.swing.JPanel) BoxLayout(javax.swing.BoxLayout) Color(java.awt.Color) FlatButtonMouseAdapter(com.jsql.view.swing.ui.FlatButtonMouseAdapter) JLabel(javax.swing.JLabel)

Example 5 with JButtonStateful

use of com.jsql.view.swing.manager.util.JButtonStateful in project jsql-injection by ron190.

the class ManagerFile method initializeRunButton.

private void initializeRunButton() {
    this.defaultText = "FILE_RUN_BUTTON_LABEL";
    this.run = new JButtonStateful(this.defaultText);
    I18nViewUtil.addComponentForKey("FILE_RUN_BUTTON_LABEL", this.run);
    this.run.setToolTipText(I18nUtil.valueByKey("FILE_RUN_BUTTON_TOOLTIP"));
    this.run.setEnabled(false);
    this.run.setContentAreaFilled(false);
    this.run.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
    this.run.setBackground(new Color(200, 221, 242));
    this.run.addMouseListener(new FlatButtonMouseAdapter(this.run));
    this.run.addActionListener(actionEvent -> {
        if (this.listFile.getSelectedValuesList().isEmpty()) {
            LOGGER.log(LogLevel.CONSOLE_ERROR, "Select at least one file to read in the list");
            return;
        }
        new Thread(() -> {
            if (ManagerFile.this.run.getState() == StateButton.STARTABLE) {
                ManagerFile.this.run.setText(I18nViewUtil.valueByKey("FILE_RUN_BUTTON_STOP"));
                ManagerFile.this.run.setState(StateButton.STOPPABLE);
                ManagerFile.this.loader.setVisible(true);
                MediatorHelper.managerWebshell().clearSelection();
                MediatorHelper.managerSqlshell().clearSelection();
                try {
                    this.readFile(this.listFile.getSelectedValuesList());
                } catch (InterruptedException e) {
                    LOGGER.log(LogLevel.CONSOLE_JAVA, e, e);
                    Thread.currentThread().interrupt();
                } catch (Exception e) {
                    LOGGER.log(LogLevel.CONSOLE_ERROR, e, e);
                }
            } else {
                MediatorHelper.model().getResourceAccess().stopSearchingFile();
                ManagerFile.this.run.setEnabled(false);
                ManagerFile.this.run.setState(StateButton.STOPPING);
            }
        }, "ThreadReadFile").start();
    });
}
Also used : JButtonStateful(com.jsql.view.swing.manager.util.JButtonStateful) Color(java.awt.Color) FlatButtonMouseAdapter(com.jsql.view.swing.ui.FlatButtonMouseAdapter) JSqlException(com.jsql.model.exception.JSqlException) ExecutionException(java.util.concurrent.ExecutionException)

Aggregations

JButtonStateful (com.jsql.view.swing.manager.util.JButtonStateful)6 FlatButtonMouseAdapter (com.jsql.view.swing.ui.FlatButtonMouseAdapter)6 Color (java.awt.Color)6 BoxLayout (javax.swing.BoxLayout)2 JLabel (javax.swing.JLabel)2 JPanel (javax.swing.JPanel)2 JSqlException (com.jsql.model.exception.JSqlException)1 ItemList (com.jsql.view.swing.list.ItemList)1 ActionBruteForce (com.jsql.view.swing.manager.util.ActionBruteForce)1 Dimension (java.awt.Dimension)1 ExecutionException (java.util.concurrent.ExecutionException)1 DefaultListModel (javax.swing.DefaultListModel)1