FTPCommander Password Recovery
Publicado: 11 Abr 2013, 04:47
Revisando la pagina de Securiy Exploted y buscando algoritmos de recuperación de contraseña pues les traigo el código de este manejador de FTP
Referencia : [Enlace externo eliminado para invitados]
Codigo:
Tendran una salida como esta donde ya tiene la pass desencriptada:
Referencia : [Enlace externo eliminado para invitados]
Codigo:
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.regex.Pattern;
/**
*
* @author adwind
*/
public class FTPCommanderRecovery {
private final static File FREE=new File(getPath("FTP Commander"));
private final static File PRO=new File("C:\\CFtp\\Ftplist.txt");
private final static File DELUXE=new File(getPath("FTP Commander Deluxe"));
private static String Decrypt(String pass) {
StringBuilder str = new StringBuilder();
for (int i = 0; i < pass.length(); i++) {
str.append((char) (pass.charAt(i) ^ 0x19));
}
return str.toString();
}
public static boolean isWindows() {
return System.getProperty("os.name").toLowerCase().startsWith("win");
}
public static boolean isFreeInstalled() {
return FREE.exists();
}
public static boolean isDeluxeInstalled() {
return DELUXE.exists();
}
public static boolean isPROInstalled() {
return PRO.exists();
}
private static void showData(File F){
try {
BufferedReader br=new BufferedReader(new FileReader(F));
while (br.ready()) {
String data=br.readLine();
String unidata[]=data.split(Pattern.quote(";"));
for(String t: unidata){
String tmp[]=t.split(Pattern.quote("="));
if(tmp[0].startsWith("Pas")){
tmp[1]=Decrypt(tmp[1]);
}
System.out.println(tmp[0]+" : "+tmp[1]);
}
System.out.println("\n");
}
} catch (Exception ex) {
}
}
private static String getPath(String tipo) {
String arch = System.getProperty("os.arch");
String path;
if (arch.contains("64")) {
path = System.getenv("ProgramFiles") + " " + "(x86)\\" + tipo + "\\Ftplist.txt";
} else {
path = System.getenv("ProgramFiles") + "\\" + tipo+ "\\Ftplist.txt";
}
return path;
}
public static void main(String[] args) {
if (isWindows()) {
if (isFreeInstalled()) {
showData(FREE);
}
if(isPROInstalled()){
showData(PRO);
}
if(isDeluxeInstalled()){
showData(DELUXE);
}
}
}
}
Tendran una salida como esta donde ya tiene la pass desencriptada:
Código: Seleccionar todo
Name : host
Server : www.host.com
Port : 21
Password : pass
User : user
Anonymous : 0
SavePassword : 1
Pasv : (
Answer : 0957681
CheckPSW : 1
CheckVHost : 0
TimeZone : 0
TimeZoneV : -1
ShowHidden : 0
MkDir : 0