elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: ¿Eres nuevo? ¿Tienes dudas acerca del funcionamiento de la comunidad? Lee las Reglas Generales


  Mostrar Mensajes
Páginas: 1 2 3 [4] 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ... 55
31  Programación / Java / [Java] ClapTrap IRC Bot 0.5 en: 15 Abril 2016, 21:26 pm
Traduccion a Java de mi IRC Bot , tiene las siguientes opciones :

  • Scanner SQLI
  • Scanner LFI
  • Buscador de panel de administracion
  • Localizador de IP
  • Buscador de DNS
  • Buscador de SQLI y RFI en google
  • Crack para hashes MD5
  • Cortador de URL usando tinyurl
  • HTTP FingerPrinting
  • Codificador base64,hex y ASCII 

Unas imagenes :





El codigo :

Código
  1. // ClapTrap IRC Bot 0.5
  2. // (C) Doddy Hackman 2015
  3. package claptrap.irc.bot;
  4.  
  5. import java.io.IOException;
  6. import java.util.regex.Matcher;
  7. import java.util.regex.Pattern;
  8. import java.io.*;
  9. import java.net.*;
  10. import java.util.Scanner;
  11. import java.util.logging.Level;
  12. import java.util.logging.Logger;
  13.  
  14. /**
  15.  *
  16.  * @author Doddy
  17.  */
  18. public class ClapTrapIRCBot {
  19.  
  20.    /**
  21.      * @param args the command line arguments
  22.      */
  23.    public static String servidor;
  24.    public static int puerto;
  25.    public static String nick;
  26.    public static String admin;
  27.  
  28.    public static String canal;
  29.    public static int tiempo;
  30.  
  31.    public static Socket conexion;
  32.    public static BufferedWriter escribir;
  33.    public static BufferedReader leer;
  34.  
  35.    public static void responder(String contenido) {
  36.        try {
  37.            String[] textos = contenido.split("\n");
  38.            for (String texto : textos) {
  39.                if (!"".equals(texto)) {
  40.                    escribir.write("PRIVMSG " + admin + " : " + texto + "\r\n");
  41.                    escribir.flush();
  42.                    try {
  43.                        Thread.sleep(tiempo * 1000);
  44.                    } catch (InterruptedException ex) {
  45.                        Logger.getLogger(ClapTrapIRCBot.class.getName()).log(Level.SEVERE, null, ex);
  46.                    }
  47.                }
  48.            }
  49.        } catch (IOException e) {
  50.            //
  51.        }
  52.    }
  53.  
  54.    public static void main(String[] args) {
  55.  
  56.        Scanner input = new Scanner(System.in);
  57.  
  58.        System.out.println("\n-- == ClapTrap IRC Bot 0.5 == --\n\n");
  59.        System.out.println("[+] Hostname : ");
  60.        String hostname_value = input.nextLine();
  61.        System.out.println("\n[+] Port : ");
  62.        Integer port_value = Integer.parseInt(input.nextLine());
  63.        System.out.println("\n[+] Channel : ");
  64.        String channel_value = input.nextLine();
  65.        System.out.println("\n[+] Nickname Admin : ");
  66.        String admin_value = input.nextLine();
  67.  
  68.        servidor = hostname_value;
  69.        puerto = port_value;
  70.        nick = "ClapTrap";
  71.        admin = admin_value;
  72.        canal = channel_value;
  73.        tiempo = 3;
  74.  
  75.        try {
  76.  
  77.            conexion = new Socket(servidor, puerto);
  78.            escribir = new BufferedWriter(
  79.                    new OutputStreamWriter(conexion.getOutputStream()));
  80.            leer = new BufferedReader(
  81.                    new InputStreamReader(conexion.getInputStream()));
  82.  
  83.            escribir.write("NICK " + nick + "\r\n");
  84.            escribir.write("USER " + nick + " 1 1 1 1\r\n");
  85.            escribir.flush();
  86.  
  87.            String contenido = null;
  88.  
  89.            escribir.write("JOIN " + canal + "\r\n");
  90.            escribir.flush();
  91.  
  92.            System.out.println("\n[+] Online");
  93.  
  94.            funciones funcion = new funciones();
  95.  
  96.            while ((contenido = leer.readLine()) != null) {
  97.  
  98.                Pattern search = null;
  99.                Matcher regex = null;
  100.  
  101.                search = Pattern.compile("^PING(.*)$");
  102.                regex = search.matcher(contenido);
  103.                if (regex.find()) {
  104.                    escribir.write("PONG " + regex.group(1) + "\r\n");
  105.                    escribir.flush();
  106.                }
  107.  
  108.                search = Pattern.compile(":(.*)!(.*) PRIVMSG (.*) :(.*)");
  109.                regex = search.matcher(contenido);
  110.                if (regex.find()) {
  111.                    String control_admin = regex.group(1);
  112.                    String text = regex.group(4);
  113.                    if (control_admin.equals(admin)) {
  114.  
  115.                        //
  116.                        search = Pattern.compile("!sqli (.*)$");
  117.                        regex = search.matcher(text);
  118.                        if (regex.find()) {
  119.                            String target = regex.group(1);
  120.                            String code = funcion.SQLI_Scanner(target);
  121.                            responder(code);
  122.                        }
  123.  
  124.                        search = Pattern.compile("!lfi (.*)$");
  125.                        regex = search.matcher(text);
  126.                        if (regex.find()) {
  127.                            String target = regex.group(1);
  128.                            String code = funcion.scan_lfi(target);
  129.                            responder(code);
  130.                        }
  131.  
  132.                        search = Pattern.compile("!panel (.*)$");
  133.                        regex = search.matcher(text);
  134.                        if (regex.find()) {
  135.                            String target = regex.group(1);
  136.                            String code = funcion.panel_finder(target);
  137.                            responder(code);
  138.                        }
  139.  
  140.                        search = Pattern.compile("!fuzzdns (.*)$");
  141.                        regex = search.matcher(text);
  142.                        if (regex.find()) {
  143.                            String target = regex.group(1);
  144.                            String code = funcion.fuzz_dns(target);
  145.                            responder(code);
  146.                        }
  147.  
  148.                        search = Pattern.compile("!locateip (.*)$");
  149.                        regex = search.matcher(text);
  150.                        if (regex.find()) {
  151.                            String target = regex.group(1);
  152.                            String code = funcion.locate_ip(target);
  153.                            responder(code);
  154.                        }
  155.  
  156.                        search = Pattern.compile("!sqlifinder (.*) (.*) (.*)$");
  157.                        regex = search.matcher(text);
  158.                        if (regex.find()) {
  159.                            String dork = regex.group(1);
  160.                            int cantidad = Integer.parseInt(regex.group(2));
  161.                            String buscador = regex.group(3);
  162.                            String code = funcion.find_sqli(dork, cantidad, buscador);
  163.                            responder(code);
  164.                        }
  165.  
  166.                        search = Pattern.compile("!rfifinder (.*) (.*) (.*)$");
  167.                        regex = search.matcher(text);
  168.                        if (regex.find()) {
  169.                            String dork = regex.group(1);
  170.                            int cantidad = Integer.parseInt(regex.group(2));
  171.                            String buscador = regex.group(3);
  172.                            String code = funcion.find_rfi(dork, cantidad, buscador);
  173.                            responder(code);
  174.                        }
  175.  
  176.                        search = Pattern.compile("!crackit (.*)$");
  177.                        regex = search.matcher(text);
  178.                        if (regex.find()) {
  179.                            String md5 = regex.group(1);
  180.                            String code = funcion.crack_md5(md5);
  181.                            responder(code);
  182.                        }
  183.  
  184.                        search = Pattern.compile("!tinyurl (.*)$");
  185.                        regex = search.matcher(text);
  186.                        if (regex.find()) {
  187.                            String url = regex.group(1);
  188.                            String code = funcion.tiny_url(url);
  189.                            responder(code);
  190.                        }
  191.  
  192.                        search = Pattern.compile("!httpfinger (.*)$");
  193.                        regex = search.matcher(text);
  194.                        if (regex.find()) {
  195.                            String page = regex.group(1);
  196.                            String code = funcion.http_finger(page);
  197.                            responder(code);
  198.                        }
  199.  
  200.                        search = Pattern.compile("!md5 (.*)$");
  201.                        regex = search.matcher(text);
  202.                        if (regex.find()) {
  203.                            String texto = regex.group(1);
  204.                            String code = "[+] MD5 : " + funcion.md5_encode(texto);
  205.                            responder(code);
  206.                        }
  207.  
  208.                        search = Pattern.compile("!base64 (.*) (.*)$");
  209.                        regex = search.matcher(text);
  210.                        if (regex.find()) {
  211.                            String option = regex.group(1);
  212.                            String texto = regex.group(2);
  213.                            String code = "";
  214.                            if ("encode".equals(option)) {
  215.                                code = "[+] Base64 : " + funcion.encode_base64(texto);
  216.                            }
  217.                            if ("decode".equals(option)) {
  218.                                code = "[+] Text : " + funcion.decode_base64(texto);
  219.                            }
  220.                            responder(code);
  221.                        }
  222.  
  223.                        search = Pattern.compile("!ascii (.*) (.*)$");
  224.                        regex = search.matcher(text);
  225.                        if (regex.find()) {
  226.                            String option = regex.group(1);
  227.                            String texto = regex.group(2);
  228.                            String code = "";
  229.                            if ("encode".equals(option)) {
  230.                                code = "[+] ASCII : " + funcion.encode_ascii(texto);
  231.                            }
  232.                            if ("decode".equals(option)) {
  233.                                code = "[+] Text : " + funcion.decode_ascii(texto);
  234.                            }
  235.                            responder(code);
  236.                        }
  237.  
  238.                        search = Pattern.compile("!hex (.*) (.*)$");
  239.                        regex = search.matcher(text);
  240.                        if (regex.find()) {
  241.                            String option = regex.group(1);
  242.                            String texto = regex.group(2);
  243.                            String code = "";
  244.                            if ("encode".equals(option)) {
  245.                                code = "[+] Hex : " + funcion.encode_hex(texto);
  246.                            }
  247.                            if ("decode".equals(option)) {
  248.                                code = "[+] Text : " + funcion.decode_hex(texto);
  249.                            }
  250.                            responder(code);
  251.                        }
  252.  
  253.                        search = Pattern.compile("!help");
  254.                        regex = search.matcher(text);
  255.                        if (regex.find()) {
  256.                            String code = "";
  257.                            code = code + "Hi , I am ClapTrap an assistant robot programmed by Doddy Hackman in the year 2015" + "\n";
  258.                            code = code + "[++] Commands" + "\n";
  259.                            code = code + "[+] !help" + "\n";
  260.                            code = code + "[+] !locateip <web>" + "\n";
  261.                            code = code + "[+] !sqlifinder <dork> <count pages> <google/bing>" + "\n";
  262.                            code = code + "[+] !rfifinder <dork> <count pages> <google/bing>" + "\n";
  263.                            code = code + "[+] !panel <page>" + "\n";
  264.                            code = code + "[+] !fuzzdns <domain>" + "\n";
  265.                            code = code + "[+] !sqli <page>" + "\n";
  266.                            code = code + "[+] !lfi <page>" + "\n";
  267.                            code = code + "[+] !crackit <hash>" + "\n";
  268.                            code = code + "[+] !tinyurl <page>" + "\n";
  269.                            code = code + "[+] !httpfinger <page>" + "\n";
  270.                            code = code + "[+] !md5 <text>" + "\n";
  271.                            code = code + "[+] !base64 <encode/decode> <text>" + "\n";
  272.                            code = code + "[+] !ascii <encode/decode> <text>" + "\n";
  273.                            code = code + "[+] !hex <encode/decode> <text>" + "\n";
  274.                            code = code + "[++] Enjoy this IRC Bot" + "\n";
  275.                            responder(code);
  276.                        }
  277.  
  278.                        //
  279.                    }
  280.                }
  281.            }
  282.        } catch (IOException e) {
  283.            System.out.println("\n[-] Error connecting");
  284.        }
  285.  
  286.    }
  287.  
  288. }
  289.  
  290. // The End ?
  291.  

Si quieren bajar el programa lo pueden hacer de aca :

SourceForge.
Github.

Eso seria todo.
32  Programación / Java / [Java] K0bra 1.0 en: 1 Abril 2016, 15:19 pm
Un simple scanner SQLI hecho en Java , tiene las siguientes funciones :

  • Comprobar vulnerabilidad
  • Buscar numero de columnas
  • Buscar automaticamente el numero para mostrar datos
  • Mostras tablas
  • Mostrar columnas
  • Mostrar bases de datos
  • Mostrar tablas de otra DB
  • Mostrar columnas de una tabla de otra DB
  • Mostrar usuarios de mysql.user
  • Buscar archivos usando load_file
  • Mostrar un archivo usando load_file
  • Mostrar valores
  • Mostrar informacion sobre la DB
  • Crear una shell usando outfile
  • Todo se guarda en logs ordenados

Unas imagenes :









Si quieren bajar el proyecto con el codigo fuente lo pueden hacer desde aca.
33  Programación / Java / [Java] PanelFinder 0.3 en: 18 Marzo 2016, 14:22 pm
Traduccion a Java de este programa para buscar el panel de administracion de una pagina.

Una imagen :



Si quieren bajar el proyecto lo pueden hacer desde aca.
34  Programación / Java / [Java] SQLI Scanner 0.4 en: 5 Marzo 2016, 16:15 pm
Un simple programa en Java para buscar paginas vulnerables a SQLI usando Google o Bing.

Una imagen :



Si lo quieren bajar el proyecto con el codigo fuente lo pueden hacer de aca.
35  Programación / Java / [Java] LocateIP 0.2 en: 20 Febrero 2016, 15:51 pm
Un simple programa en Java para localizar una IP y sus DNS.

Una imagen :



Si quieren bajar el proyecto con el codigo y el programa final lo pueden hacer de aca.
36  Programación / Java / [Java] HTTP FingerPrinting 0.2 en: 5 Febrero 2016, 15:11 pm
Un simple programa en Java para realizar HTTP FingerPrinting a una pagina.

Una imagen :



Si lo quieren bajar el proyecto con el codigo fuente lo pueden hacer de aca.
37  Programación / Java / [Java] MD5 Cracker 0.2 en: 22 Enero 2016, 16:18 pm
Un simple programa en Java para crackear un hash MD5 mediante 3 servicios online.

Una imagen :



El codigo :

Código
  1. // MD5 Cracker 0.2
  2. // (C) Doddy Hackman 2015
  3. // Credits : Based in the services ...
  4. // http://md5online.net/index.php
  5. // http://md5.my-addr.com/md5_decrypt-md5_cracker_online/md5_decoder_tool.php
  6. // http://md5decryption.com/index.php
  7. package MD5_Cracker;
  8.  
  9. import java.util.regex.Matcher;
  10. import java.util.regex.Pattern;
  11. import javax.swing.JOptionPane;
  12. import javax.swing.SwingUtilities;
  13. import org.jvnet.substance.SubstanceLookAndFeel;
  14.  
  15. /**
  16.  *
  17.  * @author Doddy
  18.  */
  19. public class Home extends javax.swing.JFrame {
  20.  
  21.    /**
  22.      * Creates new form Home
  23.      */
  24.    public Home() {
  25.        initComponents();
  26.    }
  27.  
  28.    /**
  29.      * This method is called from within the constructor to initialize the form.
  30.      * WARNING: Do NOT modify this code. The content of this method is always
  31.      * regenerated by the Form Editor.
  32.      */
  33.    @SuppressWarnings("unchecked")
  34.    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
  35.    private void initComponents() {
  36.  
  37.        jPanel3 = new javax.swing.JPanel();
  38.        jPanel1 = new javax.swing.JPanel();
  39.        txtMD5 = new javax.swing.JTextField();
  40.        btnCrack = new javax.swing.JButton();
  41.        jPanel2 = new javax.swing.JPanel();
  42.        jLabel1 = new javax.swing.JLabel();
  43.        jLabel2 = new javax.swing.JLabel();
  44.        jLabel3 = new javax.swing.JLabel();
  45.        txtPassword1 = new javax.swing.JTextField();
  46.        txtPassword2 = new javax.swing.JTextField();
  47.        txtPassword3 = new javax.swing.JTextField();
  48.        jPanel4 = new javax.swing.JPanel();
  49.        status = new javax.swing.JLabel();
  50.  
  51.        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
  52.        jPanel3.setLayout(jPanel3Layout);
  53.        jPanel3Layout.setHorizontalGroup(
  54.            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  55.            .addGap(0, 100, Short.MAX_VALUE)
  56.        );
  57.        jPanel3Layout.setVerticalGroup(
  58.            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  59.            .addGap(0, 100, Short.MAX_VALUE)
  60.        );
  61.  
  62.        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  63.        setTitle("MD5 Cracker 0.2 (C) Doddy Hackman 2015");
  64.        setResizable(false);
  65.  
  66.        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Enter MD5", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP));
  67.  
  68.        btnCrack.setText("Crack");
  69.        btnCrack.addActionListener(new java.awt.event.ActionListener() {
  70.            public void actionPerformed(java.awt.event.ActionEvent evt) {
  71.                btnCrackActionPerformed(evt);
  72.            }
  73.        });
  74.  
  75.        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
  76.        jPanel1.setLayout(jPanel1Layout);
  77.        jPanel1Layout.setHorizontalGroup(
  78.            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  79.            .addGroup(jPanel1Layout.createSequentialGroup()
  80.                .addContainerGap()
  81.                .addComponent(txtMD5, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)
  82.                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  83.                .addComponent(btnCrack, javax.swing.GroupLayout.DEFAULT_SIZE, 75, Short.MAX_VALUE)
  84.                .addContainerGap())
  85.        );
  86.        jPanel1Layout.setVerticalGroup(
  87.            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  88.            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
  89.                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  90.                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  91.                    .addComponent(txtMD5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  92.                    .addComponent(btnCrack))
  93.                .addContainerGap())
  94.        );
  95.  
  96.        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Result", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP));
  97.  
  98.        jLabel1.setText("md5online.net ->");
  99.  
  100.        jLabel2.setText("md5.my-addr.co ->");
  101.  
  102.        jLabel3.setText("md5decryption.com ->");
  103.  
  104.        txtPassword1.setEditable(false);
  105.  
  106.        txtPassword2.setEditable(false);
  107.  
  108.        txtPassword3.setEditable(false);
  109.  
  110.        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
  111.        jPanel2.setLayout(jPanel2Layout);
  112.        jPanel2Layout.setHorizontalGroup(
  113.            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  114.            .addGroup(jPanel2Layout.createSequentialGroup()
  115.                .addGap(28, 28, 28)
  116.                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
  117.                    .addGroup(jPanel2Layout.createSequentialGroup()
  118.                        .addComponent(jLabel3)
  119.                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  120.                        .addComponent(txtPassword3))
  121.                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
  122.                        .addComponent(jLabel2)
  123.                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  124.                        .addComponent(txtPassword2))
  125.                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
  126.                        .addComponent(jLabel1)
  127.                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  128.                        .addComponent(txtPassword1, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE)))
  129.                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  130.        );
  131.        jPanel2Layout.setVerticalGroup(
  132.            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  133.            .addGroup(jPanel2Layout.createSequentialGroup()
  134.                .addContainerGap()
  135.                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  136.                    .addComponent(jLabel1)
  137.                    .addComponent(txtPassword1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  138.                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  139.                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  140.                    .addComponent(jLabel2)
  141.                    .addComponent(txtPassword2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  142.                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  143.                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  144.                    .addComponent(jLabel3)
  145.                    .addComponent(txtPassword3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  146.                .addContainerGap(15, Short.MAX_VALUE))
  147.        );
  148.  
  149.        jPanel4.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
  150.  
  151.        status.setText("[+] Program Ready");
  152.  
  153.        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
  154.        jPanel4.setLayout(jPanel4Layout);
  155.        jPanel4Layout.setHorizontalGroup(
  156.            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  157.            .addGroup(jPanel4Layout.createSequentialGroup()
  158.                .addComponent(status)
  159.                .addGap(0, 0, Short.MAX_VALUE))
  160.        );
  161.        jPanel4Layout.setVerticalGroup(
  162.            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  163.            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
  164.                .addGap(0, 0, Short.MAX_VALUE)
  165.                .addComponent(status))
  166.        );
  167.  
  168.        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  169.        getContentPane().setLayout(layout);
  170.        layout.setHorizontalGroup(
  171.            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  172.            .addGroup(layout.createSequentialGroup()
  173.                .addContainerGap()
  174.                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  175.                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  176.                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  177.                .addContainerGap())
  178.            .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  179.        );
  180.        layout.setVerticalGroup(
  181.            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  182.            .addGroup(layout.createSequentialGroup()
  183.                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  184.                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  185.                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  186.                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  187.                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  188.                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  189.                .addGap(0, 0, 0))
  190.        );
  191.  
  192.        pack();
  193.    }// </editor-fold>                        
  194.  
  195.    private void btnCrackActionPerformed(java.awt.event.ActionEvent evt) {                                        
  196.  
  197.        DH_Tools tools = new DH_Tools();
  198.  
  199.        if ("".equals(txtMD5.getText())) {
  200.            JOptionPane.showMessageDialog(null, "Write MD5");
  201.        } else {
  202.  
  203.            SwingUtilities.updateComponentTreeUI(this);
  204.            status.setText("[+] Cracking ...");
  205.  
  206.            String md5 = txtMD5.getText();
  207.  
  208.            String code1 = tools.tomar("http://md5online.net/index.php", "pass=" + md5 + "&option=hash2text&send=Submit");
  209.  
  210.            Pattern search = null;
  211.            Matcher regex = null;
  212.  
  213.            search = Pattern.compile("pass : <b>(.*?)<\\/b>");
  214.            regex = search.matcher(code1);
  215.            if (regex.find()) {
  216.                txtPassword1.setText(regex.group(1));
  217.            } else {
  218.                txtPassword1.setText("Not Found");
  219.            }
  220.  
  221.            String code2 = tools.tomar("http://md5.my-addr.com/md5_decrypt-md5_cracker_online/md5_decoder_tool.php", "md5=" + md5);
  222.  
  223.            search = Pattern.compile("<span class='middle_title'>Hashed string<\\/span>: (.*?)<\\/div>");
  224.            regex = search.matcher(code2);
  225.            if (regex.find()) {
  226.                txtPassword2.setText(regex.group(1));
  227.            } else {
  228.                txtPassword2.setText("Not Found");
  229.            }
  230.  
  231.            String code3 = tools.tomar("http://md5decryption.com/index.php", "hash=" + md5 + "&submit=Decrypt It!");
  232.  
  233.            search = Pattern.compile("Decrypted Text: <\\/b>(.*?)<\\/font>");
  234.            regex = search.matcher(code3);
  235.            if (regex.find()) {
  236.                txtPassword3.setText(regex.group(1));
  237.            } else {
  238.                txtPassword3.setText("Not Found");
  239.            }
  240.  
  241.            SwingUtilities.updateComponentTreeUI(this);
  242.            status.setText("[+] Finished");
  243.  
  244.        }
  245.  
  246.  
  247.    }                                        
  248.  
  249.    /**
  250.      * @param args the command line arguments
  251.      */
  252.    public static void main(String args[]) {
  253.        /* Set the Nimbus look and feel */
  254.        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  255.        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
  256.          * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  257.          */
  258.        try {
  259.            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
  260.                if ("Nimbus".equals(info.getName())) {
  261.                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
  262.                    break;
  263.                }
  264.            }
  265.        } catch (ClassNotFoundException ex) {
  266.            java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  267.        } catch (InstantiationException ex) {
  268.            java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  269.        } catch (IllegalAccessException ex) {
  270.            java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  271.        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
  272.            java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  273.        }
  274.        //</editor-fold>
  275.  
  276.        /* Create and display the form */
  277.        Home.setDefaultLookAndFeelDecorated(true);
  278.        String skin = "org.jvnet.substance.skin.RavenGraphiteGlassSkin";
  279.        SubstanceLookAndFeel.setSkin(skin);
  280.        SubstanceLookAndFeel.setCurrentWatermark("org.jvnet.substance.watermark.SubstanceMetalWallWatermark");
  281.  
  282.        java.awt.EventQueue.invokeLater(new Runnable() {
  283.            public void run() {
  284.                new Home().setVisible(true);
  285.            }
  286.        });
  287.    }
  288.  
  289.    // Variables declaration - do not modify                    
  290.    private javax.swing.JButton btnCrack;
  291.    private javax.swing.JLabel jLabel1;
  292.    private javax.swing.JLabel jLabel2;
  293.    private javax.swing.JLabel jLabel3;
  294.    private javax.swing.JPanel jPanel1;
  295.    private javax.swing.JPanel jPanel2;
  296.    private javax.swing.JPanel jPanel3;
  297.    private javax.swing.JPanel jPanel4;
  298.    private javax.swing.JLabel status;
  299.    private javax.swing.JTextField txtMD5;
  300.    private javax.swing.JTextField txtPassword1;
  301.    private javax.swing.JTextField txtPassword2;
  302.    private javax.swing.JTextField txtPassword3;
  303.    // End of variables declaration                  
  304. }
  305.  
  306. // The End ?
  307.  

Si quieren bajar el programa lo pueden hacer de aca.
38  Programación / Java / [Java] Class DH Tools 0.2 en: 15 Enero 2016, 16:21 pm
Mi primer clase en Java , se llama DH Tools y tiene las siguientes opciones :

  • Realizar una peticion GET y guardar el contenido
  • Realizar una peticion POST y guardar el contenido
  • Crear o escribir archivos
  • Leer archivos
  • Ejecutar comandos y leer su respuesta
  • HTTP FingerPrinting
  • Leer el codigo de respuesta de una URL
  • Borrar repetidos en un ArrayList
  • Cortar las URL en un ArrayList a partir del query
  • Split casero xD
  • Descargar archivos
  • Capturar el archivo de una URL
  • URI Split
  • MD5 Encode
  • MD5 File
  • Get IP

El codigo de la clase :

Código
  1. // Class : DH Tools
  2. // Version : 0.2
  3. // (C) Doddy Hackman 2015
  4. // Functions :
  5. //
  6. //public String toma(String link)
  7. //public String tomar(String pagina, String data)
  8. //public void savefile(String ruta, String texto)
  9. //public String read_file(String ruta)
  10. //public String console(String command)
  11. //public String httpfinger(String target)
  12. //public Integer response_code(String page)
  13. //public ArrayList repes(ArrayList array)
  14. //public ArrayList cortar(ArrayList array)
  15. //public String regex(String code, String deaca, String hastaaca)
  16. //public Boolean download(String url, File savefile)
  17. //public String extract_file_by_url(String url)
  18. //public String uri_split(String link, String opcion)
  19. //public String md5_encode(String text)
  20. //public String md5_file(String file)
  21. //public String get_ip(String hostname)
  22. //
  23. package dhtools;
  24.  
  25. import java.io.*;
  26. import java.net.*;
  27. import java.nio.channels.Channels;
  28. import java.nio.channels.ReadableByteChannel;
  29. import java.util.ArrayList;
  30. import java.util.Scanner;
  31. import java.util.regex.Matcher;
  32. import java.util.regex.Pattern;
  33. import java.security.*;
  34.  
  35. public class DH_Tools {
  36.  
  37.    public String toma(String link) {
  38.        String re;
  39.        StringBuffer conte = new StringBuffer(40);
  40.        try {
  41.            URL url = new URL(link);
  42.            URLConnection nave = url.openConnection();
  43.            nave.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0");
  44.            BufferedReader leyendo = new BufferedReader(
  45.                    new InputStreamReader(nave.getInputStream()));
  46.            while ((re = leyendo.readLine()) != null) {
  47.                conte.append(re);
  48.            }
  49.            leyendo.close();
  50.        } catch (Exception e) {
  51.            //
  52.        }
  53.        return conte.toString();
  54.    }
  55.  
  56.    public String tomar(String pagina, String data) {
  57.        // Credits : Function based in http://www.mkyong.com/java/how-to-send-http-request-getpost-in-java/
  58.        String respuesta = "";
  59.  
  60.        try {
  61.            URL url_now = new URL(pagina);
  62.            HttpURLConnection nave = (HttpURLConnection) url_now.openConnection();
  63.  
  64.            nave.setRequestMethod("POST");
  65.            nave.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0");
  66.  
  67.            nave.setDoOutput(true);
  68.            DataOutputStream send = new DataOutputStream(nave.getOutputStream());
  69.            send.writeBytes(data);
  70.            send.flush();
  71.            send.close();
  72.  
  73.            BufferedReader leyendo = new BufferedReader(new InputStreamReader(nave.getInputStream()));
  74.            StringBuffer code = new StringBuffer();
  75.            String linea;
  76.  
  77.            while ((linea = leyendo.readLine()) != null) {
  78.                code.append(linea);
  79.            }
  80.            leyendo.close();
  81.            respuesta = code.toString();
  82.        } catch (Exception e) {
  83.            //
  84.        }
  85.        return respuesta;
  86.    }
  87.  
  88.    public void savefile(String ruta, String texto) {
  89.  
  90.        FileWriter escribir = null;
  91.        File archivo = null;
  92.  
  93.        try {
  94.  
  95.            archivo = new File(ruta);
  96.  
  97.            if (!archivo.exists()) {
  98.                archivo.createNewFile();
  99.            }
  100.  
  101.            escribir = new FileWriter(archivo, true);
  102.            escribir.write(texto);
  103.            escribir.flush();
  104.            escribir.close();
  105.  
  106.        } catch (Exception e) {
  107.            //
  108.        }
  109.    }
  110.  
  111.    public String read_file(String ruta) {
  112.        String contenido = null;
  113.        try {
  114.            Scanner leyendo = new Scanner(new FileReader(ruta));
  115.            contenido = leyendo.next();
  116.        } catch (Exception e) {
  117.            //
  118.        }
  119.        return contenido;
  120.    }
  121.  
  122.    public String console(String command) {
  123.        String contenido = null;
  124.        try {
  125.            Process proceso = Runtime.getRuntime().exec("cmd /c " + command);
  126.            proceso.waitFor();
  127.            BufferedReader leyendo = new BufferedReader(
  128.                    new InputStreamReader(proceso.getInputStream()));
  129.            String linea;
  130.            StringBuffer code = new StringBuffer();
  131.            while ((linea = leyendo.readLine()) != null) {
  132.                code.append(linea);
  133.            }
  134.            contenido = code.toString();
  135.        } catch (Exception e) {
  136.            //
  137.        }
  138.        return contenido;
  139.    }
  140.  
  141.    public String httpfinger(String target) {
  142.  
  143.        String resultado = "";
  144.  
  145.        //http://www.mkyong.com/java/how-to-get-http-response-header-in-java/
  146.        try {
  147.  
  148.            URL page = new URL(target);
  149.            URLConnection nave = page.openConnection();
  150.  
  151.            String server = nave.getHeaderField("Server");
  152.            String etag = nave.getHeaderField("ETag");
  153.            String content_length = nave.getHeaderField("Content-Length");
  154.            String expires = nave.getHeaderField("Expires");
  155.            String last_modified = nave.getHeaderField("Last-Modified");
  156.            String connection = nave.getHeaderField("Connection");
  157.            String powered = nave.getHeaderField("X-Powered-By");
  158.            String pragma = nave.getHeaderField("Pragma");
  159.            String cache_control = nave.getHeaderField("Cache-Control");
  160.            String date = nave.getHeaderField("Date");
  161.            String vary = nave.getHeaderField("Vary");
  162.            String content_type = nave.getHeaderField("Content-Type");
  163.            String accept_ranges = nave.getHeaderField("Accept-Ranges");
  164.  
  165.            if (server != null) {
  166.                resultado += "[+] Server : " + server + "\n";
  167.            }
  168.            if (etag != null) {
  169.                resultado += "[+] E-tag : " + etag + "\n";
  170.            }
  171.            if (content_length != null) {
  172.                resultado += "[+] Content-Length : " + content_length + "\n";
  173.            }
  174.  
  175.            if (expires != null) {
  176.                resultado += "[+] Expires : " + expires + "\n";
  177.            }
  178.  
  179.            if (last_modified != null) {
  180.                resultado += "[+] Last Modified : " + last_modified + "\n";
  181.            }
  182.  
  183.            if (connection != null) {
  184.                resultado += "[+] Connection : " + connection + "\n";
  185.            }
  186.  
  187.            if (powered != null) {
  188.                resultado += "[+] Powered : " + powered + "\n";
  189.            }
  190.  
  191.            if (pragma != null) {
  192.                resultado += "[+] Pragma : " + pragma + "\n";
  193.            }
  194.  
  195.            if (cache_control != null) {
  196.                resultado += "[+] Cache control : " + cache_control + "\n";
  197.            }
  198.  
  199.            if (date != null) {
  200.                resultado += "[+] Date : " + date + "\n";
  201.            }
  202.            if (vary != null) {
  203.                resultado += "[+] Vary : " + vary + "\n";
  204.            }
  205.            if (content_type != null) {
  206.                resultado += "[+] Content-Type : " + content_type + "\n";
  207.            }
  208.            if (accept_ranges != null) {
  209.                resultado += "[+] Accept Ranges : " + accept_ranges + "\n";
  210.            }
  211.  
  212.        } catch (Exception e) {
  213.            //
  214.        }
  215.  
  216.        return resultado;
  217.  
  218.    }
  219.  
  220.    public Integer response_code(String page) {
  221.        Integer response = 0;
  222.        try {
  223.            URL url = new URL(page);
  224.            URLConnection nave1 = url.openConnection();
  225.            HttpURLConnection nave2 = (HttpURLConnection) nave1;
  226.            nave2.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0");
  227.            response = nave2.getResponseCode();
  228.        } catch (Exception e) {
  229.            response = 404;
  230.        }
  231.        return response;
  232.    }
  233.  
  234.    public ArrayList repes(ArrayList array) {
  235.        Object[] listando = array.toArray();
  236.        for (Object item : listando) {
  237.            if (array.indexOf(item) != array.lastIndexOf(item)) {
  238.                array.remove(array.lastIndexOf(item));
  239.            }
  240.        }
  241.        return array;
  242.    }
  243.  
  244.    public ArrayList cortar(ArrayList array) {
  245.        ArrayList array2 = new ArrayList();
  246.        for (int i = 0; i < array.size(); i++) {
  247.            String code = (String) array.get(i);
  248.            Pattern regex1 = null;
  249.            Matcher regex2 = null;
  250.            regex1 = Pattern.compile("(.*?)=(.*?)");
  251.            regex2 = regex1.matcher(code);
  252.            if (regex2.find()) {
  253.                array2.add(regex2.group(1) + "=");
  254.            }
  255.        }
  256.        return array2;
  257.    }
  258.  
  259.    public String regex(String code, String deaca, String hastaaca) {
  260.        String resultado = "";
  261.        Pattern regex1 = null;
  262.        Matcher regex2 = null;
  263.        regex1 = Pattern.compile(deaca + "(.*?)" + hastaaca);
  264.        regex2 = regex1.matcher(code);
  265.        if (regex2.find()) {
  266.            resultado = regex2.group(1);
  267.        }
  268.        return resultado;
  269.    }
  270.  
  271.    public Boolean download(String url, File savefile) {
  272.        // Credits : Based on http://stackoverflow.com/questions/921262/how-to-download-and-save-a-file-from-internet-using-java
  273.        // Thanks to Brian Risk
  274.        try {
  275.            URL download_page = new URL(url);
  276.            ReadableByteChannel down1 = Channels.newChannel(download_page.openStream());
  277.            FileOutputStream down2 = new FileOutputStream(savefile);
  278.            down2.getChannel().transferFrom(down1, 0, Long.MAX_VALUE);
  279.            down1.close();
  280.            down2.close();
  281.            return true;
  282.        } catch (IOException e) {
  283.            return false;
  284.        }
  285.    }
  286.  
  287.    public String extract_file_by_url(String url) {
  288.        return url.substring(url.lastIndexOf('/') + 1);
  289.    }
  290.  
  291.    public String uri_split(String link, String opcion) {
  292.        String resultado = "";
  293.        try {
  294.            URL url = new URL(link);
  295.            if (opcion == "protocol") {
  296.                resultado = url.getProtocol();
  297.            } else if (opcion == "authority") {
  298.                resultado = url.getAuthority();
  299.            } else if (opcion == "host") {
  300.                resultado = url.getHost();
  301.            } else if (opcion == "port") {
  302.                resultado = String.valueOf(url.getPort());
  303.            } else if (opcion == "path") {
  304.                resultado = url.getPath();
  305.            } else if (opcion == "query") {
  306.                resultado = url.getQuery();
  307.            } else if (opcion == "filename") {
  308.                resultado = url.getFile();
  309.            } else if (opcion == "ref") {
  310.                resultado = url.getRef();
  311.            } else {
  312.                resultado = "Error";
  313.            }
  314.  
  315.        } catch (Exception e) {
  316.            //
  317.        }
  318.        return resultado;
  319.    }
  320.  
  321.    public String md5_encode(String text) {
  322.        // Credits : Based on http://www.avajava.com/tutorials/lessons/how-do-i-generate-an-md5-digest-for-a-string.html
  323.        StringBuffer string_now = null;
  324.        try {
  325.            MessageDigest generate = MessageDigest.getInstance("MD5");
  326.            generate.update(text.getBytes());
  327.            byte[] result = generate.digest();
  328.            string_now = new StringBuffer();
  329.            for (byte line : result) {
  330.                string_now.append(String.format("%02x", line & 0xff));
  331.            }
  332.        } catch (Exception e) {
  333.            //
  334.        }
  335.        return string_now.toString();
  336.    }
  337.  
  338.    public String md5_file(String file) {
  339.        //Credits : Based on http://stackoverflow.com/questions/304268/getting-a-files-md5-checksum-in-java
  340.        // Thanks to
  341.        String resultado = "";
  342.        try {
  343.            MessageDigest convert = MessageDigest.getInstance("MD5");
  344.            FileInputStream file_now = new FileInputStream(file);
  345.  
  346.            byte[] bytes_now = new byte[1024];
  347.  
  348.            int now_now = 0;
  349.            while ((now_now = file_now.read(bytes_now)) != -1) {
  350.                convert.update(bytes_now, 0, now_now);
  351.            };
  352.            byte[] converting = convert.digest();
  353.            StringBuffer result = new StringBuffer();
  354.            for (int i = 0; i < converting.length; i++) {
  355.                result.append(Integer.toString((converting[i] & 0xff) + 0x100, 16).substring(1));
  356.            }
  357.            resultado = result.toString();
  358.        } catch (Exception e) {
  359.            //
  360.        }
  361.        return resultado;
  362.    }
  363.  
  364.    public String get_ip(String hostname) {
  365.        String resultado = "";
  366.        try {
  367.            InetAddress getting_ip = InetAddress.getByName(hostname);
  368.            resultado = getting_ip.getHostAddress();
  369.        } catch (Exception e) {
  370.            //
  371.        }
  372.        return resultado;
  373.    }
  374. }
  375.  
  376. // The End ?
  377.  

Ejemplos de uso :

Código
  1. package dhtools;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.Collections;
  5.  
  6. public class Main {
  7.  
  8.    public static void main(String[] args) {
  9.        DH_Tools tools = new DH_Tools();
  10.        //String codigo = tools.toma("http://localhost/");
  11.        //String codigo = tools.tomar("http://localhost/login.php", "usuario=test&password=dsdsads&control=Login");
  12.        //tools.savefile("c:/xampp/texto.txt","texto");
  13.        //String codigo = tools.read_file("c:/xampp/texto.txt");
  14.        //String codigo = tools.console("ver");
  15.        //String codigo = tools.httpfinger("http://www.petardas.com");
  16.        /*
  17.          ArrayList array = new ArrayList();
  18.          Collections.addAll(array, "http://localhost/sql.php?id=dsaadsds", "b", "http://localhost/sql.php?id=dsaadsds", "c");
  19.          ArrayList array2 = tools.repes(tools.cortar(array));
  20.          for (int i = 0; i < array2.size(); i++) {
  21.          System.out.println(array2.get(i));
  22.          }
  23.          */
  24.        //System.out.println(tools.regex("1sadasdsa2","1","2"));
  25.        //System.out.println(tools.response_code("http://www.petardas.com/"));
  26.        /*
  27.          File savefile = new File("c:/xampp/*****.avi");
  28.          if(tools.download("http://localhost/test.avi",savefile)) {
  29.          System.out.println("yeah");
  30.          }
  31.          */
  32.  
  33.        //System.out.println(tools.extract_file_by_url("http://localhost/dsaads/dsadsads/index.php"));
  34.        //System.out.println(tools.uri_split("http://localhost/index.php?id=dadsdsa","query"));
  35.        //System.out.println(tools.md5_encode("123"));
  36.        //System.out.println(tools.md5_file("c:\\xampp\\texto.txt"));
  37.        //System.out.println(tools.get_ip("www.petardas.com"));
  38.    }
  39.  
  40. }
  41.  

Eso seria todo.
39  Programación / PHP / [PHP] Ban System 0.3 en: 8 Enero 2016, 19:22 pm
Un simple script en PHP para banear una IP en una pagina.

Una imagen :



Los codigos :

index.php

Código
  1. <?php
  2.  
  3. // Ban System 0.3
  4. // (C) Doddy Hackman 2015
  5.  
  6. // Login
  7.  
  8. $username = "admin"; // Edit
  9. $password = "21232f297a57a5a743894a0e4a801fc3"; // Edit
  10.  
  11. //
  12.  
  13. $index = "admin.php"; // Edit
  14.  
  15. if (isset($_GET['poraca'])) {
  16.  
  17.    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  18.  
  19. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  20. <html xmlns="http://www.w3.org/1999/xhtml">
  21.   <head>
  22.      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  23.      <title>Login</title>
  24.      <link rel="shortcut icon" href="images/icono.png">
  25.      <link href="style.css" rel="stylesheet" type="text/css" />
  26.   </head>
  27.   <body>
  28.      <center><br>
  29.         <div class="post">
  30.            <h3>Login</h3>
  31.            <div class="post_body">
  32.               <img src="images/login.jpg" width="562" height="440" />
  33.               <br />
  34.               <form action="" method=POST>
  35.                  Username : <input type=text size=30 name=username /><br
  36.  
  37. /><br />
  38.                  Password : <input type=password size=30 name=password
  39.  
  40. /><br /><br />
  41.                  <input type=submit name=login style="width: 100px;"
  42.  
  43. value=Login /><br /><br />
  44.               </form>
  45.            </div>
  46.         </div>
  47.      </center>
  48.   </body>
  49. </html>';
  50.  
  51.    if (isset($_POST['login'])) {
  52.  
  53.        $test_username = $_POST['username'];
  54.        $test_password = md5($_POST['password']);
  55.  
  56.        if ($test_username == $username && $test_password == $password) {
  57.            setcookie("login", base64_encode($test_username . "@" . $test_password));
  58.            echo "<script>alert('Welcome idiot');</script>";
  59.            $ruta = "http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/" . $index;
  60.            echo '<meta http-equiv="refresh" content="0; url=' . htmlentities($ruta) . '"
  61.  
  62. />';
  63.        } else {
  64.            echo "<script>alert('Fuck You');</script>";
  65.        }
  66.    }
  67.  
  68. } else {
  69.    echo '<meta http-equiv="refresh" content="0;
  70.  
  71. url=http://www.petardas.com" />';
  72. }
  73.  
  74. // The End ?
  75.  
  76. ?>
  77.  

admin.php

Código
  1. <?php
  2.  
  3. // Ban System 0.3
  4. // (C) Doddy Hackman 2015
  5.  
  6.  
  7. // Login
  8.  
  9. $username = "admin"; // Edit
  10. $password = "21232f297a57a5a743894a0e4a801fc3"; // Edit
  11.  
  12. // DB
  13.  
  14. $host  = "localhost"; // Edit
  15. $userw = "root"; // Edit
  16. $passw = ""; // Edit
  17. $db    = "ban"; // Edit
  18.  
  19. if (isset($_COOKIE['login'])) {
  20.  
  21.    $st = base64_decode($_COOKIE['login']);
  22.  
  23.    $plit = explode("@", $st);
  24.    $user = $plit[0];
  25.    $pass = $plit[1];
  26.  
  27.    if ($user == $username and $pass == $password) {
  28.  
  29.        mysql_connect($host, $userw, $passw);
  30.        mysql_select_db($db);
  31.  
  32.        echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  33. <html xmlns="http://www.w3.org/1999/xhtml">
  34.   <head>
  35.      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  36.      <title>Ban System 0.3</title>
  37.      <link href="style.css" rel="stylesheet" type="text/css" />
  38.      <link rel="shortcut icon" href="images/icono.png">
  39.   </head>
  40.   <body>
  41.   <center>';
  42.  
  43.        mysql_connect($host, $userw, $passw);
  44.        mysql_select_db($db);
  45.  
  46.        echo '         <br><img src="images/ban.png" /><br><br>';
  47.  
  48.        if (isset($_POST['instalar'])) {
  49.  
  50.            $todo = "create table ban_system (
  51. id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  52. ip TEXT NOT NULL,
  53. PRIMARY KEY(id));
  54. ";
  55.  
  56.            if (mysql_query($todo)) {
  57.                echo "<script>alert('Installed');</script>";
  58.                echo '<meta http-equiv="refresh" content=0;URL=>';
  59.            } else {
  60.                echo "<script>alert('Error');</script>";
  61.            }
  62.        }
  63.  
  64.        if (mysql_num_rows(mysql_query("show tables like 'ban_system'"))) {
  65.  
  66.            echo "<title>Ban System 0.3 Administracion</title>";
  67.  
  68.            if (isset($_POST['ipadd'])) {
  69.  
  70.                $ipfinal = ip2long($_POST['ipadd']);
  71.                $ipaz    = $_POST['ipadd'];
  72.  
  73.                if ($ipfinal == -1 || $ipfinal === FALSE) {
  74.                    echo "<script>alert('IP invalid');</script>";
  75.  
  76.                } else {
  77.  
  78.                    if (mysql_query("INSERT INTO ban_system (id,ip) values (NULL,'$ipaz')")) {
  79.                        echo "<script>alert('IP added');</script>";
  80.                    } else {
  81.                        echo "<script>alert('Error');</script>";
  82.                    }
  83.  
  84.  
  85.                }
  86.            }
  87.  
  88.            if (isset($_GET['del'])) {
  89.                $id = $_GET['del'];
  90.                if (@mysql_query("DELETE FROM ban_system where id ='$id'")) {
  91.                    echo "<script>alert('IP Deleted');</script>";
  92.                } else {
  93.                    echo "<script>alert('Error');</script>";
  94.                }
  95.            }
  96.  
  97.            echo '
  98.            <div class="post">
  99.                <h3>Add IP</h3>
  100.                   <div class="post_body">';
  101.  
  102.            echo "<br>
  103. <form action='' method=POST>
  104. <b>IP : </b><input type=text name=ipadd value=127.0.0.1> <input type=submit style='width: 100px;' value=Add>
  105. </form><br>";
  106.  
  107.            echo '                </div>
  108.            </div>';
  109.  
  110.  
  111.            $sql       = "select id from ban_system";
  112.            $resultado = mysql_query($sql);
  113.            $cantidad  = mysql_num_rows($resultado);
  114.  
  115.            echo '
  116.            <div class="post">
  117.                <h3>Banned : ' . htmlentities($cantidad) . '</h3>
  118.                   <div class="post_body"><br>';
  119.  
  120.            if ($cantidad <= 0) {
  121.                echo '<b>No entries found</b><br>';
  122.            } else {
  123.  
  124.                echo '<table>
  125. <td><b>ID</b></td><td><b>IP</b></td><td><b>Option</b></td><tr>';
  126.  
  127.                $sen = @mysql_query("select * from ban_system order by id ASC");
  128.  
  129.                while ($ab = @mysql_fetch_array($sen)) {
  130.  
  131.                    echo "<td>" . htmlentities($ab[0]) . "</td><td>" . htmlentities($ab[1]) . "</td><td><a href=?del=" . htmlentities($ab[0]) . ">Delete</a></td><tr>";
  132.                }
  133.  
  134.                echo '</table>';
  135.  
  136.            }
  137.  
  138.            echo '                <br></div>
  139.            </div>';
  140.  
  141.            echo "</table>
  142. </center>
  143. ";
  144.            //
  145.        } else {
  146.  
  147.            echo '
  148.            <div class="post">
  149.                <h3>Installer</h3>
  150.                   <div class="post_body">';
  151.  
  152.            echo "
  153. <form action='' method=POST>
  154. <h2>Do you want install Ban System ?</h2><br>
  155. <input type=submit style='width: 100px;' name=instalar value=Install><br><br>
  156. </form>";
  157.  
  158.            echo '                </div>
  159.            </div>';
  160.  
  161.        }
  162.  
  163.        echo '
  164.   <br><h3>(C) Doddy Hackman 2015</h3><br>
  165.   </center>
  166.   </body>
  167. </html>';
  168.  
  169.        mysql_close();
  170.        exit(1);
  171.  
  172.    } else {
  173.        echo "<script>alert('Fuck You');</script>";
  174.    }
  175. } else {
  176.    echo '<meta http-equiv="refresh" content="0; url=http://www.petardas.com" />';
  177. }
  178.  
  179. ?>
  180.  

style.css

Código
  1. /*
  2.  
  3. ==-----------------------------------==
  4. || Name : DH Theme                   ||
  5. || Version : 0.8                     ||  
  6. || Author : Doddy H                  ||
  7. || Description: Templante            ||
  8. || Date : 14/1/2015                  ||
  9. ==-----------------------------------==
  10.  
  11. */
  12.  
  13. body {
  14. background:transparent url("images/fondo.jpg") repeat scroll 0 0;
  15. color:gray;
  16. font-family:helvetica,arial,sans-serif;
  17. font-size:14px;
  18. text-align:center;
  19. }
  20.  
  21. a:link {
  22. text-decoration:none;
  23. color:orange;
  24. }
  25. a:visited {
  26. color:orange;
  27. }
  28. a:hover {
  29. color:orange;
  30. }
  31.  
  32. td,tr {
  33. border-style:solid;
  34. border-color: gray;
  35. border-width: 1px;
  36. background: black;
  37. border: solid #222 2px;
  38. color:gray;
  39. font-family:helvetica,arial,sans-serif;
  40. font-size:14px;
  41. text-align:center;
  42.  
  43. word-wrap: break-word;
  44. word-break:break-all;
  45. }
  46.  
  47. input {
  48. border-style:solid;
  49. border-color: gray;
  50. border-width: 1px;
  51. background: black;
  52. border: solid #222 2px;
  53. color:gray;
  54. font-family:helvetica,arial,sans-serif;
  55. font-size:14px;
  56. }
  57.  
  58. .post {
  59. background-color:black;
  60. color:gray;
  61. margin-bottom:10px;
  62. width:600px;
  63. word-wrap: break-word;
  64. }
  65.  
  66. .post h3 {
  67. background-color:black;
  68. color:orange;
  69. background-color:#000;
  70. border: solid #222 2px;
  71. -webkit-border-radius: 4px;
  72. -moz-border-radius: 4px;
  73. border-radius: 4px;
  74. padding:5px 10px;
  75. }
  76.  
  77. .post_body {
  78. background-color:black;
  79. margin:-20px 0 0 0;
  80. color:white;
  81. background-color:#000;
  82. border: solid #222 2px;
  83. -webkit-border-radius: 4px;
  84. -moz-border-radius: 4px;
  85. border-radius: 4px;
  86. padding:5px 10px;
  87. }
  88.  
  89. /* The End ? */
  90.  

ban.php

Código
  1. <?php
  2.  
  3. // Ban System 0.3
  4. // (C) Doddy Hackman 2015
  5.  
  6.  
  7. // DB
  8.  
  9. $host  = "localhost"; // Edit
  10. $userw = "root"; // Edit
  11. $passw = ""; // Edit
  12. $db    = "ban"; // Edit
  13.  
  14. //
  15.  
  16. $texto = "Acceso Denegado"; // Edit
  17.  
  18. mysql_connect($host, $userw, $passw);
  19.  
  20. $ipa = ip2long($_SERVER['REMOTE_ADDR']);
  21. $ip  = $_SERVER['REMOTE_ADDR'];
  22.  
  23. if ($ip == "::1") {
  24.    $ipa = 1;
  25. }
  26.  
  27. if ($ipa == -1 || $ipa === FALSE) {
  28.    echo "<script>alert('Good try');</script>";
  29. } else {
  30.  
  31.    if ($ip == "::1") {
  32.        $ip = "127.0.0.1";
  33.    }
  34.    $re = mysql_query("select ip from ban_system where ip='$ip'");
  35.  
  36.    if (mysql_num_rows($re) > 0) {
  37.        echo "<center><h1>" . htmlentities($texto) . "</h1></center>";
  38.        exit(1);
  39.    }
  40.  
  41. }
  42.  
  43.  
  44. // The End ?
  45.  
  46. ?>
  47.  

test.php

Código
  1. <?php
  2.  
  3. include("ban.php");
  4.  
  5. echo "aca toy";
  6.  
  7. ?>
  8.  

Si quieren bajar el programa lo pueden hacer de aca.
40  Programación / Programación General / [Delphi] Project Arsenal X 0.2 (Regalo de navidad) en: 25 Diciembre 2015, 18:52 pm
Version en Delphi de este programa similar al juego HackTheGame pero con la unica diferencia de que todo es real xD , tiene las siguientes opciones :

  • Gmail Inbox
  • Ping
  • Get IP
  • K0bra (Scanner SQLI)
[++] Comprobar vulnerabilidad
[++] Buscar numero de columnas
[++] Buscar automaticamente el numero para mostrar datos
[++] Mostras tablas
[++] Mostrar columnas
[++] Mostrar bases de datos
[++] Mostrar tablas de otra DB
[++] Mostrar columnas de una tabla de otra DB
[++] Mostrar usuarios de mysql.user
[++] Buscar archivos usando load_file
[++] Mostrar un archivo usando load_file
[++] Mostrar valores
[++] Mostrar informacion sobre la DB
[++] Crear una shell usando outfile
[++] Todo se guarda en logs ordenados

  • Panel Control
  • FTP Cracker
  • Whois
  • Downloader
  • Locate IP
  • MD5 Cracker
  • Port Scanner
  • Bing Scanner
  • Console

Una imagen :



Un video con ejemplos de uso :



Para leer el correo necesitan tener instalado Win32OpenSSL para que el inbox les funcione , tambien necesitan habilitar la opcion de "Acceso de aplicaciones menos seguras" desde este link para la cuenta Gmail que van a usar.

Si quieren bajar el programa lo pueden hacer de aca :

SourceForge.
Github.

Eso seria todo.
Páginas: 1 2 3 [4] 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ... 55
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines