/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package exploitpack;

import java.awt.Color;
import java.awt.Toolkit;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.UnsupportedAudioFileException;
import javax.swing.JOptionPane;
import javax.swing.text.DefaultCaret;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;

/**
 *
 * @author jsacco
 */
public class AutoPwn extends javax.swing.JFrame {

    private String licenseType;
    private String ShellcodeSelected;
    private String runModule;
    public boolean noExploits = false;
    public boolean executed = false;
    // Configuration
    public String nmappath;
    public String pythonpath;
    public String ScannerOptions = "";
    public String serverPort = "";
    public String userName = "";
    public String userEmail = "";
    public String userWeb = "";
    List<String> config = new ArrayList<>();

    /**
     * Creates new form UpdateManager
     */
    public AutoPwn() {
        try {
            initComponents();
            setLocationRelativeTo(null);
            this.setVisible(true);
            setDefaultCloseOperation(ExploitWizard.DISPOSE_ON_CLOSE);
            getContentPane().setBackground(Color.WHITE);
            setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/exploitpack/resources/bug.png")));

            // Read config file
            FileReader fstreamConfig = new FileReader("output/" + "config" + ".ep");
            BufferedReader inConfig = new BufferedReader(fstreamConfig);
            String stringToAppend;
            while ((stringToAppend = inConfig.readLine()) != null) {
                config.add(stringToAppend);
            }

            pythonpath = config.get(0);
            nmappath = config.get(1);
            ScannerOptions = config.get(2);
            serverPort = config.get(3);
            userName = config.get(4);
            userEmail = config.get(5);
            userWeb = config.get(6);

        } catch (IOException ex) {
            Logger.getLogger(AutoPwn.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jProgressBar1 = new javax.swing.JProgressBar();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextAreaUpdate = new javax.swing.JTextArea();
        jSeparator1 = new javax.swing.JSeparator();
        jLabel6 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jCheckBox1 = new javax.swing.JCheckBox();
        jTextFieldTargetIP = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jComboBoxAttack = new javax.swing.JComboBox();
        jLabel9 = new javax.swing.JLabel();
        jComboBoxShellcode = new javax.swing.JComboBox();
        jSeparator2 = new javax.swing.JSeparator();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Exploit Pack - AutoPwn - http://exploitpack.com");
        setResizable(false);

        jButton1.setText("Close");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton2.setText("Run");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jTextAreaUpdate.setEditable(false);
        jTextAreaUpdate.setBackground(java.awt.Color.black);
        jTextAreaUpdate.setColumns(20);
        jTextAreaUpdate.setForeground(java.awt.Color.green);
        jTextAreaUpdate.setRows(5);
        jTextAreaUpdate.setText("AutoPwn module could take several minutes...\nClick \"Run\" to start the process.\n\n");
        jScrollPane1.setViewportView(jTextAreaUpdate);

        jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/exploitpack/resources/up2.png"))); // NOI18N

        jPanel1.setBackground(java.awt.Color.white);
        jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        jCheckBox1.setSelected(true);
        jCheckBox1.setText("Quick scan using Nmap");

        jTextFieldTargetIP.setText("127.0.0.1");

        jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/exploitpack/resources/target.png"))); // NOI18N
        jLabel7.setText("Target:");

        jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/exploitpack/resources/options.png"))); // NOI18N
        jLabel8.setText("Attack type:");

        jComboBoxAttack.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Select one..", "Open ports", "By services", "References" }));

        jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/exploitpack/resources/shellcode.png"))); // NOI18N
        jLabel9.setText("Shell code:");

        jComboBoxShellcode.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Shellcode..", "Execute Code", "Remote Shell" }));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jTextFieldTargetIP, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jCheckBox1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jComboBoxShellcode, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jComboBoxAttack, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel7)
                            .addComponent(jTextFieldTargetIP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jCheckBox1))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jComboBoxAttack, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel8))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jComboBoxShellcode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel9))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 551, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(0, 0, Short.MAX_VALUE)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 458, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jProgressBar1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addContainerGap())))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabel6)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(3, 3, 3)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 381, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        dispose();
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        if (jComboBoxAttack.getSelectedItem().toString().equals("Select one..")) {
            JOptionPane.showMessageDialog(null, "Please choose an attack type.", "Exploit Pack says:", JOptionPane.ERROR_MESSAGE);
            return;
        }
        if (jComboBoxShellcode.getSelectedItem().toString().equals("Shellcode..")) {
            JOptionPane.showMessageDialog(null, "Please chose one shellcode.", "Exploit Pack says:", JOptionPane.ERROR_MESSAGE);
            return;
        }
        DefaultCaret caret = (DefaultCaret) jTextAreaUpdate.getCaret();
        caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);
        FileReader fstream = null;
        jTextAreaUpdate.append("Preparing environment for this instance..\n");

        Exploit exploit = new Exploit();
        List<String> ports = new ArrayList<>();
        List<String> commands = new ArrayList<>();

        try {
            // Exec wav
            AudioInputStream s;
            AudioFormat f;
            DataLine.Info info;
            File inputFile = new File("data/newautopwninstancestarted.wav");
            Clip c;

            s = AudioSystem.getAudioInputStream(inputFile);
            f = s.getFormat();
            info = new DataLine.Info(Clip.class, f);
            c = (Clip) AudioSystem.getLine(info);
            c.open(s);
            c.start();
            fstream = new FileReader("data/config/exploitpack1");
            BufferedReader in = new BufferedReader(fstream);
            licenseType = in.readLine() + "\n";
            // Close the output stream
            in.close();
            if (licenseType.contains("1")) {
                jTextAreaUpdate.append("Starting Auto Pwn.. Please wait\n\n");

                final Thread autoPwn;
                autoPwn = new Thread("autoPwn") {

                    @Override
                    public void run() {
                        try {
                            try {
                                jTextAreaUpdate.append("Scanner ready waiting for commands.\n");
                                jTextAreaUpdate.append("Executing port scanner, this could take a few minutes.\n");

                                // Exec connection to localhost
                                String cmd = nmappath + " " + ScannerOptions + " " + jTextFieldTargetIP.getText() + " -oX log/" + jTextFieldTargetIP.getText() + ".xml";

                                Process proc = Runtime.getRuntime().exec(cmd);
                                jProgressBar1.setValue(5);
                                try (BufferedReader reader = new BufferedReader(new InputStreamReader(proc.getErrorStream()))) {
                                    String line = null;
                                    while ((line = reader.readLine()) != null) {
                                        Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, null, line);
                                    }
                                }

                                DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
                                DocumentBuilder dBuilder;
                                dBuilder = dbFactory.newDocumentBuilder();
                                Document doc = dBuilder.parse(new File("log/" + jTextFieldTargetIP.getText() + ".xml"));
                                doc.getDocumentElement().normalize();
                                NodeList nList = doc.getElementsByTagName("port");
                                for (int temp = 0; temp < nList.getLength(); temp++) {
                                    Node nNode = nList.item(temp);
                                    if (nNode.getNodeType() == Node.ELEMENT_NODE) {
                                        Element eElement = (Element) nNode;
                                        String port = eElement.getAttribute("portid");
                                        jTextAreaUpdate.append("Open port detected: "
                                                + eElement
                                                        .getAttribute("protocol")
                                                + " - "
                                                + port + " - State: Listen" + "\n");
                                        ports.add(port);

                                    }
                                }

                            } catch (IOException | SAXException | ParserConfigurationException ex) {
                                Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, null, ex);
                                return;
                            }

                            jTextAreaUpdate.append("Scanner executed successfully.\n\n");
                            jTextAreaUpdate.append("Preparing exploit list.. Please wait\n");
                            // Exec exploits
                            ports.stream().forEach((port) -> {
                                String path = "exploits/";
                                String files;
                                File folder = new File(path);
                                File[] listOfFiles = folder.listFiles();
                                jProgressBar1.setMaximum(listOfFiles.length);

                                for (int xploit = 0; xploit < listOfFiles.length; xploit++) {
                                    jProgressBar1.setValue(xploit);

                                    if (listOfFiles[xploit].isFile()) {
                                        files = listOfFiles[xploit].getName();
                                        if (files.endsWith(".xml") || files.endsWith(".XML")) {
                                            // Instancio XMLTreenode
                                            XMLTreenode NewXMLNode = new XMLTreenode();
                                            // Start de la clase main de XMLTreenode
                                            NewXMLNode.main(null, files);

                                            if (NewXMLNode.RemotePort.equals(port)) {
                                                try {
                                                    // Set new instance of exploit
                                                    exploit.setModuleName(NewXMLNode.ExploitName);
                                                    exploit.setCodeName(NewXMLNode.CodeName);
                                                    exploit.setType(NewXMLNode.ExploitType);
                                                    exploit.setPlatform(NewXMLNode.Platform);
                                                    exploit.setService(NewXMLNode.Service);
                                                    exploit.setShellcodePort(NewXMLNode.ShellPort);
                                                    exploit.setRemotePort(NewXMLNode.RemotePort);
                                                    exploit.setShellcodeAvail(NewXMLNode.ShellcodeAvailable);
                                                    exploit.setInformation(NewXMLNode.Information);
                                                    exploit.setSpecialArgs(NewXMLNode.SpecialArgs);

                                                    jTextAreaUpdate.append("Executing exploit: " + exploit.getModuleName() + " " + exploit.getPlatform() + "\n");
                                                    // Shellcode Remote Shell
                                                    if (jComboBoxShellcode.getSelectedItem().toString().equals("Remote Shell")) {
                                                        ShellcodeSelected = "R";
                                                    }
                                                    // Shellcode execute code
                                                    if (jComboBoxShellcode.getSelectedItem().toString().equals("Execute Code")) {
                                                        ShellcodeSelected = "E";
                                                    }
                                                    runModule = pythonpath + " exploits/code/" + exploit.getCodeName()
                                                            + " " + jTextFieldTargetIP.getText() + " "
                                                            + port + " "
                                                            + "E";

                                                    commands.add(runModule);

                                                    Process procExploit = Runtime.getRuntime().exec(runModule);
                                                    procExploit.waitFor(5, TimeUnit.SECONDS);

                                                    executed = true;

                                                } catch (IOException | InterruptedException ex) {
                                                    Logger.getLogger(AutoPwn.class.getName()).log(Level.SEVERE, null, ex);
                                                }

                                            } else {
                                                noExploits = true;

                                            }
                                        }
                                    }
                                }
                            });
                            if (noExploits && false == executed) {
                                jTextAreaUpdate.append("\nNo exploits found with that criteria.\n");
                                jTextAreaUpdate.append("Finishing AutoPwn instance..\n");
                            }

                            jProgressBar1.setValue(100);
                            // Finally
                            jTextAreaUpdate.append("\nExploit Pack - AutoPwn has been executed successfully.");
                            jButton2.setEnabled(false);
                            // Exec wav
                            AudioInputStream s;
                            AudioFormat f;
                            DataLine.Info info;
                            File inputFile = new File("data/autopwninstancefinished.wav");
                            Clip c;

                            s = AudioSystem.getAudioInputStream(inputFile);
                            f = s.getFormat();
                            info = new DataLine.Info(Clip.class, f);
                            c = (Clip) AudioSystem.getLine(info);
                            c.open(s);
                            c.start();
                        } catch (UnsupportedAudioFileException | IOException | LineUnavailableException ex) {
                            Logger.getLogger(AutoPwn.class.getName()).log(Level.SEVERE, null, ex);
                        }
                    }
                };
                autoPwn.start();
            }
        } catch (IOException | UnsupportedAudioFileException | LineUnavailableException ex) {
            Logger.getLogger(AutoPwn.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jButton2ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;

                }
            }
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(AutoPwn.class
                    .getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new AutoPwn().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JComboBox jComboBoxAttack;
    private javax.swing.JComboBox jComboBoxShellcode;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JProgressBar jProgressBar1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JTextArea jTextAreaUpdate;
    private javax.swing.JTextField jTextFieldTargetIP;
    // End of variables declaration//GEN-END:variables
}
