AddTabExploitRceProgramPostgres.java

/*******************************************************************************
 * Copyhacked (H) 2012-2025.
 * This program and the accompanying materials
 * are made available under no term at all, use it like
 * you want, but share and discuss it
 * every time possible with every body.
 * 
 * Contributors:
 *      ron190 at ymail dot com - initial implementation
 ******************************************************************************/
package com.jsql.view.swing.interaction;

import com.jsql.view.interaction.InteractionCommand;
import com.jsql.view.swing.util.MediatorHelper;

import javax.swing.*;
import java.util.UUID;

/**
 * Create a new tab for the terminal.
 */
public class AddTabExploitRceProgramPostgres extends CreateTabHelper implements InteractionCommand {

    /**
     * @param interactionParams The local path and url for the shell
     */
    public AddTabExploitRceProgramPostgres(Object[] interactionParams) {
        // nothing
    }

    @Override
    public void execute() {
        SwingUtilities.invokeLater(() -> MediatorHelper.tabResults().addTabExploitRce(
            (String command, UUID terminalID) -> MediatorHelper.model().getResourceAccess().getExploitPostgres().runRceProgramCmd(command, terminalID)
        ));
    }
}