comment
IRC Chat
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.

Identidad Falsa

  • 0 Respuestas
  • 1055 Vistas

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

Desconectado Hu3c0

  • *
  • Underc0der
  • Mensajes: 433
  • Actividad:
    1.67%
  • Reputación 0
  • In the middle Netbeans
    • Ver Perfil
« en: Febrero 15, 2015, 06:33:24 pm »
Hola compañeros de Underc0de, os presento un programa que he hecho en java para generar datos falsos, en realidad extrae los datos de una página web que los genera.

Recién he estado estudiando esta librería interesante You are not allowed to view links. Register or Login , bueno me puse a estudiarla y que mejor manera de estudiar una librería, que es haciendo un programa con ella.

Aquí os pongo el código porque a mí me gusta leer código para aprender y ver nuevas cosas:


Código: Java
  1. package identity_fake;
  2.  
  3. import java.awt.Color;
  4. import java.io.BufferedWriter;
  5. import java.io.File;
  6. import java.io.FileWriter;
  7. import javax.swing.JOptionPane;
  8.  
  9. /**
  10.  *
  11.  * @author Designer
  12.  */
  13. public class Identity_Fake extends javax.swing.You are not allowed to view links. Register or Login {
  14.     private static You are not allowed to view links. Register or Login pais=null;
  15.     private static You are not allowed to view links. Register or Login sexo=null;
  16.     private static int edad=18;
  17.    
  18.     public Identity_Fake() {
  19.         initComponents();
  20.         setLocationRelativeTo(null);
  21.         setTitle("Fake identity Code by_Designer");
  22.         getContentPane().setBackground(You are not allowed to view links. Register or Login.black);
  23.     }
  24.  
  25.     /**
  26.      * This method is called from within the constructor to initialize the form.
  27.      * WARNING: Do NOT modify this code. The content of this method is always
  28.      * regenerated by the Form Editor.
  29.      */
  30.     @SuppressWarnings("unchecked")
  31.     // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
  32.     private void initComponents() {
  33.  
  34.         jLabel1 = new javax.swing.You are not allowed to view links. Register or Login();
  35.         jButton1 = new javax.swing.You are not allowed to view links. Register or Login();
  36.         jComboBoxPaises = new javax.swing.You are not allowed to view links. Register or Login();
  37.         jComboBoxSexo = new javax.swing.You are not allowed to view links. Register or Login();
  38.         jSliderEdad = new javax.swing.You are not allowed to view links. Register or Login();
  39.         jTextFieldEdad = new javax.swing.You are not allowed to view links. Register or Login();
  40.         jButtonCrearId = new javax.swing.You are not allowed to view links. Register or Login();
  41.         jScrollPane1 = new javax.swing.You are not allowed to view links. Register or Login();
  42.         jTextAreaRecibido = new javax.swing.You are not allowed to view links. Register or Login();
  43.         jButton2 = new javax.swing.You are not allowed to view links. Register or Login();
  44.         jButton3 = new javax.swing.You are not allowed to view links. Register or Login();
  45.  
  46.         setDefaultCloseOperation(javax.swing.You are not allowed to view links. Register or Login.EXIT_ON_CLOSE);
  47.         setFocusable(false);
  48.         setFocusableWindowState(false);
  49.         setUndecorated(true);
  50.         setResizable(false);
  51.  
  52.         jLabel1.setIcon(new javax.swing.You are not allowed to view links. Register or Login(getClass().getResource("/resources/Tituloidentity.PNG"))); // NOI18N
  53.  
  54.         jButton1.setBackground(java.awt.You are not allowed to view links. Register or Login.lightGray);
  55.         jButton1.setText("X");
  56.         jButton1.addMouseListener(new java.awt.event.You are not allowed to view links. Register or Login() {
  57.             public void mouseClicked(java.awt.event.You are not allowed to view links. Register or Login evt) {
  58.                 jButton1MouseClicked(evt);
  59.             }
  60.         });
  61.  
  62.         jComboBoxPaises.setModel(new javax.swing.You are not allowed to view links. Register or Login(new You are not allowed to view links. Register or Login[] { "Alemania", "Argentina", "Australia", "Bolivia", "Belice", "Brasil", "Canada", "Colombia", "Costa Rica", "Chile", "Cuba", "Ecuador", "El Salvador", "España", "Estados Unidos", "Francia", "Guatemala", "Haiti", "Honduras", "Holanda", "Inglaterra", "Mexico", "Nicaragua", "Nueva Zelanda", "Panama", "Paraguay", "Peru", "Puerto Rico", "Rep.Dominicana", "Reino Unido", "Uruguay", "Venezuela", " " }));
  63.         jComboBoxPaises.addActionListener(new java.awt.event.You are not allowed to view links. Register or Login() {
  64.             public void actionPerformed(java.awt.event.You are not allowed to view links. Register or Login evt) {
  65.                 jComboBoxPaisesActionPerformed(evt);
  66.             }
  67.         });
  68.  
  69.         jComboBoxSexo.setModel(new javax.swing.You are not allowed to view links. Register or Login(new You are not allowed to view links. Register or Login[] { "Masculino", "Femenino" }));
  70.         jComboBoxSexo.addActionListener(new java.awt.event.You are not allowed to view links. Register or Login() {
  71.             public void actionPerformed(java.awt.event.You are not allowed to view links. Register or Login evt) {
  72.                 jComboBoxSexoActionPerformed(evt);
  73.             }
  74.         });
  75.  
  76.         jSliderEdad.setMajorTickSpacing(10);
  77.         jSliderEdad.setMaximum(99);
  78.         jSliderEdad.setMinimum(18);
  79.         jSliderEdad.setPaintTicks(true);
  80.         jSliderEdad.setPaintTrack(false);
  81.         jSliderEdad.setValue(33);
  82.         jSliderEdad.addChangeListener(new javax.swing.event.You are not allowed to view links. Register or Login() {
  83.             public void stateChanged(javax.swing.event.You are not allowed to view links. Register or Login evt) {
  84.                 jSliderEdadStateChanged(evt);
  85.             }
  86.         });
  87.  
  88.         jTextFieldEdad.setBackground(new java.awt.You are not allowed to view links. Register or Login(183, 245, 248));
  89.         jTextFieldEdad.setText("Edad=33");
  90.         jTextFieldEdad.setOpaque(false);
  91.  
  92.         jButtonCrearId.setText("Crear Identidad");
  93.         jButtonCrearId.addActionListener(new java.awt.event.You are not allowed to view links. Register or Login() {
  94.             public void actionPerformed(java.awt.event.You are not allowed to view links. Register or Login evt) {
  95.                 jButtonCrearIdActionPerformed(evt);
  96.             }
  97.         });
  98.  
  99.         jTextAreaRecibido.setColumns(20);
  100.         jTextAreaRecibido.setRows(5);
  101.         jTextAreaRecibido.setWrapStyleWord(true);
  102.         jTextAreaRecibido.setOpaque(false);
  103.         jScrollPane1.setViewportView(jTextAreaRecibido);
  104.  
  105.         jButton2.setText("Guardar en .txt");
  106.         jButton2.addActionListener(new java.awt.event.You are not allowed to view links. Register or Login() {
  107.             public void actionPerformed(java.awt.event.You are not allowed to view links. Register or Login evt) {
  108.                 jButton2ActionPerformed(evt);
  109.             }
  110.         });
  111.  
  112.         jButton3.setText("about");
  113.         jButton3.addActionListener(new java.awt.event.You are not allowed to view links. Register or Login() {
  114.             public void actionPerformed(java.awt.event.You are not allowed to view links. Register or Login evt) {
  115.                 jButton3ActionPerformed(evt);
  116.             }
  117.         });
  118.  
  119.         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  120.         getContentPane().setLayout(layout);
  121.         layout.setHorizontalGroup(
  122.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  123.             .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, You are not allowed to view links. Register or Login.MAX_VALUE)
  124.             .addGroup(layout.createSequentialGroup()
  125.                 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, You are not allowed to view links. Register or Login.MAX_VALUE)
  126.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
  127.                     .addComponent(jScrollPane1)
  128.                     .addGroup(layout.createSequentialGroup()
  129.                         .addComponent(jComboBoxPaises, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  130.                         .addGap(28, 28, 28)
  131.                         .addComponent(jComboBoxSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  132.                         .addGap(26, 26, 26)
  133.                         .addComponent(jSliderEdad, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
  134.                         .addGap(55, 55, 55)
  135.                         .addComponent(jTextFieldEdad, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE))
  136.                     .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
  137.                         .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
  138.                         .addGap(18, 18, 18)
  139.                         .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
  140.                         .addGap(18, 18, 18)
  141.                         .addComponent(jButtonCrearId, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
  142.                         .addGap(18, 18, 18)
  143.                         .addComponent(jButton1)))
  144.                 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, You are not allowed to view links. Register or Login.MAX_VALUE))
  145.         );
  146.         layout.setVerticalGroup(
  147.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  148.             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
  149.                 .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
  150.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 36, You are not allowed to view links. Register or Login.MAX_VALUE)
  151.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  152.                     .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
  153.                         .addComponent(jSliderEdad, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, You are not allowed to view links. Register or Login.MAX_VALUE)
  154.                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  155.                             .addComponent(jComboBoxPaises)
  156.                             .addComponent(jComboBoxSexo)))
  157.                     .addComponent(jTextFieldEdad, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))
  158.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  159.                 .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
  160.                 .addGap(78, 78, 78)
  161.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  162.                     .addComponent(jButton1)
  163.                     .addComponent(jButtonCrearId)
  164.                     .addComponent(jButton2)
  165.                     .addComponent(jButton3))
  166.                 .addContainerGap())
  167.         );
  168.  
  169.         pack();
  170.     }// </editor-fold>                        
  171.  
  172.     private void jButton1MouseClicked(java.awt.event.You are not allowed to view links. Register or Login evt) {                                      
  173.         You are not allowed to view links. Register or Login.exit(0);
  174.     }                                    
  175.  
  176.     private void jComboBoxPaisesActionPerformed(java.awt.event.You are not allowed to view links. Register or Login evt) {                                                
  177.          this.pais=jComboBoxPaises.getSelectedItem().toString();
  178.          
  179.          
  180.     }                                              
  181.  
  182.     private void jSliderEdadStateChanged(javax.swing.event.You are not allowed to view links. Register or Login evt) {                                        
  183.         jTextFieldEdad.setText("Edad ="+jSliderEdad.getValue());
  184.         this.edad=jSliderEdad.getValue();
  185.        
  186.        
  187.        
  188.     }                                        
  189.  
  190.     private void jComboBoxSexoActionPerformed(java.awt.event.You are not allowed to view links. Register or Login evt) {                                              
  191.           this.sexo=jComboBoxSexo.getSelectedItem().toString();
  192.          
  193.     }                                            
  194.  
  195.     private void jButtonCrearIdActionPerformed(java.awt.event.You are not allowed to view links. Register or Login evt) {                                              
  196.         You are not allowed to view links. Register or Login aknew = new You are not allowed to view links. Register or Login();
  197.         TransferDateToUrl tdurl = new TransferDateToUrl();
  198.         aknew=tdurl.Retorno(pais, sexo, pais);
  199.         jTextAreaRecibido.setText(You are not allowed to view links. Register or Login.valueOf(aknew.toString()));
  200.        
  201.                
  202.    
  203.    
  204.          You are not allowed to view links. Register or Login.showMessageDialog
  205.         (null,"Okey you've got....!"
  206.                 ,"Información",You are not allowed to view links. Register or Login.INFORMATION_MESSAGE);
  207.        
  208.        
  209.     }                                              
  210.  
  211.     private void jButton2ActionPerformed(java.awt.event.You are not allowed to view links. Register or Login evt) {                                        
  212.         You are not allowed to view links. Register or Login salida = new You are not allowed to view links. Register or Login(".");
  213.         You are not allowed to view links. Register or Login rdnName= You are not allowed to view links. Register or Login.toHexString(You are not allowed to view links. Register or Login.currentTimeMillis());
  214.    
  215.         You are not allowed to view links. Register or Login bw = null;
  216.         try{
  217.             You are not allowed to view links. Register or Login nameexit = salida.getAbsolutePath();
  218.             bw =new You are not allowed to view links. Register or Login(new You are not allowed to view links. Register or Login(nameexit+"\\"+rdnName+".txt"));
  219.             bw.write(jTextAreaRecibido.getText());
  220.             bw.close();
  221.         }
  222.         catch (You are not allowed to view links. Register or Login e2){}
  223.         jTextAreaRecibido.setText("");
  224.         You are not allowed to view links. Register or Login.showMessageDialog
  225.         (null,"Okey you can do a new one...!"
  226.                 ,"Ready",You are not allowed to view links. Register or Login.INFORMATION_MESSAGE);
  227.     }                                        
  228.  
  229.     private void jButton3ActionPerformed(java.awt.event.You are not allowed to view links. Register or Login evt) {                                        
  230.        this.setVisible(false);
  231.        About openform =new About();
  232.        openform.setVisible(true);
  233.     }                                        
  234.  
  235.     public static void main(You are not allowed to view links. Register or Login args[]) {
  236.         /* Set the Nimbus look and feel */
  237.         //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  238.         /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
  239.          * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  240.          */
  241.         try {
  242.             for (javax.swing.You are not allowed to view links. Register or Login info : javax.swing.You are not allowed to view links. Register or Login.getInstalledLookAndFeels()) {
  243.                 if ("Nimbus".equals(info.getName())) {
  244.                     javax.swing.You are not allowed to view links. Register or Login.setLookAndFeel(info.getClassName());
  245.                     break;
  246.                 }
  247.             }
  248.         } catch (You are not allowed to view links. Register or Login ex) {
  249.             java.util.logging.Logger.getLogger(Identity_Fake.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  250.         } catch (You are not allowed to view links. Register or Login ex) {
  251.             java.util.logging.Logger.getLogger(Identity_Fake.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  252.         } catch (You are not allowed to view links. Register or Login ex) {
  253.             java.util.logging.Logger.getLogger(Identity_Fake.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  254.         } catch (javax.swing.You are not allowed to view links. Register or Login ex) {
  255.             java.util.logging.Logger.getLogger(Identity_Fake.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  256.         }
  257.         //</editor-fold>
  258.  
  259.        
  260.         java.awt.You are not allowed to view links. Register or Login.invokeLater(new You are not allowed to view links. Register or Login() {
  261.             public void run() {
  262.                 new Identity_Fake().setVisible(true);
  263.             }
  264.         });
  265.     }
  266.  
  267.     // Variables declaration - do not modify                    
  268.     private javax.swing.You are not allowed to view links. Register or Login jButton1;
  269.     private javax.swing.You are not allowed to view links. Register or Login jButton2;
  270.     private javax.swing.You are not allowed to view links. Register or Login jButton3;
  271.     private javax.swing.You are not allowed to view links. Register or Login jButtonCrearId;
  272.     private javax.swing.You are not allowed to view links. Register or Login jComboBoxPaises;
  273.     private javax.swing.You are not allowed to view links. Register or Login jComboBoxSexo;
  274.     private javax.swing.You are not allowed to view links. Register or Login jLabel1;
  275.     private javax.swing.You are not allowed to view links. Register or Login jScrollPane1;
  276.     private javax.swing.You are not allowed to view links. Register or Login jSliderEdad;
  277.     private javax.swing.You are not allowed to view links. Register or Login jTextAreaRecibido;
  278.     private javax.swing.You are not allowed to view links. Register or Login jTextFieldEdad;
  279.     // End of variables declaration                  
  280. }

Código: Java
  1. package identity_fake;
  2.  
  3. /**
  4.  *
  5.  * @author Designer
  6.  */
  7. import java.io.File;
  8. import javax.swing.JOptionPane;
  9. import org.jsoup.Jsoup;
  10. import org.jsoup.nodes.Document;
  11. import org.jsoup.nodes.Element;
  12. import org.jsoup.select.Elements;
  13. public class TransferDateToUrl {
  14.     private You are not allowed to view links. Register or Login sB= new You are not allowed to view links. Register or Login();
  15.     TransferDateToUrl(){}
  16.    
  17.     public You are not allowed to view links. Register or Login Retorno(You are not allowed to view links. Register or Login pais,You are not allowed to view links. Register or Login sexo,You are not allowed to view links. Register or Login edad){
  18.      You are not allowed to view links. Register or Login url="http://www.datafakegenerator.com/generador.php";
  19.         You are not allowed to view links. Register or Login document= null;
  20.         try{
  21.           document=  Jsoup.connect(url)
  22.                   .userAgent("Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:2.0b10) Gecko/20110126 Firefox/4.0b10")
  23.                   .data("pais",pais,"sexo",sexo,"de",edad,"hasta",edad,"generar","Generar")
  24.                   .cookie("auth","token")
  25.                   .timeout(4000)
  26.                   .post()
  27.                   ;
  28.          
  29.           int intfinal=41;
  30.           for (int i =13;i<intfinal;i++){
  31.            You are not allowed to view links. Register or Login tr = document.select("tr ").get(i);
  32.           Elements td =tr.select("td");
  33.         sB.append(td.text());
  34.          
  35.          
  36.           }
  37.          
  38.         }
  39.         catch (You are not allowed to view links. Register or Login e){
  40.          You are not allowed to view links. Register or Login.showMessageDialog
  41.         (null,"Okey your file was create with exit....!\n"
  42.                 +"Use by your Own risk && be god boy...!"
  43.                ,"Información",You are not allowed to view links. Register or Login.INFORMATION_MESSAGE);
  44.         }
  45.      
  46.         return this.sB;
  47.        
  48.     }
  49. }




« Última modificación: Diciembre 15, 2015, 07:20:16 pm por Expermicid »
You are not allowed to view links. Register or Login

 

¿Te gustó el post? COMPARTILO!