Código:
Espero respuestas, saludos! # import java.io.ByteArrayInputStream; # import java.io.FileInputStream; # import java.io.ObjectInputStream; # import java.util.ArrayList; # import java.util.HashMap; # import java.util.Iterator; # import java.util.Set; # import java.util.TreeMap; # import java.util.regex.Matcher; # import java.util.regex.Pattern; # # # public class Pass { # # public static void main(String[] args) # { # System.out.println("*******************************************************"); # System.out.println("OAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA)"); # System.out.println("*******************************************************\n"); # # try # { # FileInputStream fichero=new FileInputStream("config/database.script"); # # byte[] contenido= new byte[2048000]; # # fichero.read(contenido); # # String cadena=new String(contenido); # # Pattern patron = Pattern.compile("'AccountController'.*?'(.*?)'"); # # Matcher encaja = patron.matcher(cadena); # # if(encaja.find()) # { # # String lol=encaja.group(1); # # ObjectInputStream ois = new ObjectInputStream(new # ByteArrayInputStream(stringtobytearray(lol))); # # HashMap aver=(HashMap)ois.readObject(); # TreeMap lista_cuentas=(TreeMap)aver.get("accountlist"); # # Set list=lista_cuentas.keySet(); # # Iterator iter=list.iterator(); # # while(iter.hasNext()) # { # String clave=(String)iter.next(); # # ArrayList eso=(ArrayList)lista_cuentas.get(clave); # # if(!eso.isEmpty()) # { # jd.plugins.Account cuenta=(jd.plugins.Account)eso.get(0); # # System.out.println("\n*************"); # System.out.println(clave); # System.out.println("USER: "+cuenta.getUser()); # System.out.println("PASS: "+cuenta.getPass()); # System.out.println("*************"); # } # } # } # else # System.out.println("ERROR: file is damaged :("); # # fichero.close(); # } # catch(Exception e) # { # e.printStackTrace(); # } # } # # public static byte[] stringtobytearray(String cadena) # { # byte[] bytes = new byte[cadena.length()/2]; # # for(int i=0, b=0; i+1<cadena.length(); i+=2, b++) # { # String aux=cadena.substring(i, i+2); # # bytes[b]=(byte)Short.parseShort(aux, 16); # } # # return bytes; # } # }