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;
}
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);
}
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));
}
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;
}
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();
});
}
Aggregations