use of com.jsql.view.swing.scrollpane.LightScrollPaneShell in project jsql-injection by ron190.
the class CreateSQLShellTab method execute.
@Override
public void execute() {
if (MediatorGui.frame() == null) {
LOGGER.error("Unexpected unregistered MediatorGui.frame() in " + this.getClass());
}
try {
UUID terminalID = UUID.randomUUID();
ShellSql terminal = new ShellSql(terminalID, this.url, this.user, this.pass);
MediatorGui.frame().getConsoles().put(terminalID, terminal);
LightScrollPane scroller = new LightScrollPaneShell(terminal);
MediatorGui.tabResults().addTab("SQL shell ", scroller);
// Focus on the new tab
MediatorGui.tabResults().setSelectedComponent(scroller);
// Create a custom tab header with close button
TabHeader header = new TabHeader("SQL shell", HelperUi.ICON_SHELL_SERVER);
MediatorGui.tabResults().setToolTipTextAt(MediatorGui.tabResults().indexOfComponent(scroller), "<html><b>URL</b><br>" + this.url + RessourceAccess.FILENAME_SQLSHELL + "<br><b>Path</b><br>" + this.path + RessourceAccess.FILENAME_SQLSHELL + "</html>");
// Apply the custom header to the tab
MediatorGui.tabResults().setTabComponentAt(MediatorGui.tabResults().indexOfComponent(scroller), header);
terminal.requestFocusInWindow();
} catch (MalformedURLException e) {
LOGGER.warn("Incorrect shell Url", e);
}
}
use of com.jsql.view.swing.scrollpane.LightScrollPaneShell in project jsql-injection by ron190.
the class CreateShellTab method execute.
@Override
public void execute() {
if (MediatorGui.frame() == null) {
LOGGER.error("Unexpected unregistered MediatorGui.frame() in " + this.getClass());
}
try {
UUID terminalID = UUID.randomUUID();
ShellWeb terminal = new ShellWeb(terminalID, this.url);
MediatorGui.frame().getConsoles().put(terminalID, terminal);
LightScrollPane scroller = new LightScrollPaneShell(terminal);
MediatorGui.tabResults().addTab("Web shell ", scroller);
// Focus on the new tab
MediatorGui.tabResults().setSelectedComponent(scroller);
// Create a custom tab header with close button
TabHeader header = new TabHeader("Web shell", HelperUi.ICON_SHELL_SERVER);
MediatorGui.tabResults().setToolTipTextAt(MediatorGui.tabResults().indexOfComponent(scroller), "<html><b>URL</b><br>" + this.url + RessourceAccess.FILENAME_WEBSHELL + "<br><b>Path</b><br>" + this.path + RessourceAccess.FILENAME_WEBSHELL + "</html>");
// Apply the custom header to the tab
MediatorGui.tabResults().setTabComponentAt(MediatorGui.tabResults().indexOfComponent(scroller), header);
terminal.requestFocusInWindow();
} catch (MalformedURLException e) {
LOGGER.warn("Incorrect shell Url", e);
}
}
Aggregations