cielavenir

Display zip password

Mar 23rd, 2012
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.79 KB | None | 0 0
  1. import java.io.*;
  2. import java.util.zip.*;
  3. import javax.crypto.spec.*;
  4. import javax.crypto.*;
  5.  
  6. class Main{
  7.     public static void main(String[] args){
  8.         try{
  9.             FileInputStream in=new FileInputStream(args[0]);
  10.             ZipInputStream zip=new ZipInputStream(in);
  11.             ZipEntry entry;
  12.             while((entry=zip.getNextEntry())!=null){
  13.                 if(entry.getName().equals("assets/setting")){
  14.                     byte key[] = new byte[(int)entry.getSize()];
  15.                     zip.read(key, 0, (int)entry.getSize());
  16.  
  17.                     /// this cipher is secret ///
  18.                     Cipher cipher = Cipher.getInstance("AES/ECB/ISO10126Padding");
  19.                     cipher.init(2, new SecretKeySpec("03nWNpmRjtmsXw95".getBytes("UTF-8"),"AES"));
  20.                     String key2=new String(cipher.doFinal(key));
  21.  
  22.                     System.out.println(key2);
  23.                     break;
  24.                 }
  25.             }
  26.         }catch(Exception e){}
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment