Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.awt.event.*;
- import java.awt.image.*;
- import javax.swing.*;
- public class IGU
- {
- private JFrame ventana;
- private JLabel label2;
- private JLabel label3;
- public IGU()
- {
- makeFrame();
- }
- /**
- * Crea la interfaz de usuario
- */
- private void makeFrame()
- {
- ventana = new JFrame("FTPBruteForce");
- Container contenedor = ventana.getContentPane();
- contenedor.setLayout(new GridLayout (5, 1));
- JLabel label1 = new JLabel("Introduce la direccion: ");
- contenedor.add(label1);
- JTextField txt1 = new JTextField("127.0.0.1");
- contenedor.add(txt1);
- JButton a = new JButton("Atacar");
- a.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) { crack(txt1.getText()); }
- });
- contenedor.add(a);
- label2 = new JLabel();
- label3 = new JLabel();
- contenedor.add(label2);
- contenedor.add(label3);
- showUser(" ");
- showPass(" ");
- ventana.pack();
- ventana.setVisible(true);
- }
- private void showUser(String user){
- label2.setText("User: " + user);
- }
- private void showPass(String pass){
- label3.setText("Password: " + pass);
- }
- public void crack(String text){
- FTPBruteForce ftp = new FTPBruteForce();
- credenciales cre = ftp.crackFTP(text);
- label2.setText("User: " + cre.devolverUser());
- label3.setText("Pass: " + cre.devolverPass());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement