· 7 years ago · Mar 07, 2018, 11:34 AM
1import java.io.*;
2import java.util.*;
3import javax.crypto.*;
4import javax.crypto.spec.*;
5
6public class mcreco {
7
8 public static void main(String[] args) throws Exception {
9 String p = "Path To Your lastlogin file for minecraft";
10 String r = mcd(p);
11 System.out.println(r);
12 }
13
14 public static String mcd(String p) throws Exception {
15 PBEKeySpec pk = new PBEKeySpec("passwordfile".toCharArray());
16 String ci = "PBEWithMD5AndDES";
17 String output = null;
18 Random random = new Random(43287234L);
19 byte[] salt = new byte[8];
20 random.nextBytes(salt);
21 PBEParameterSpec pbeParamSpec = new PBEParameterSpec(salt, 5);
22 SecretKey pbeKey = SecretKeyFactory.getInstance(ci).generateSecret(pk);
23 Cipher cipher = Cipher.getInstance(ci);
24 cipher.init(2, pbeKey, pbeParamSpec);
25
26 DataInputStream dis = new DataInputStream(
27 new CipherInputStream(
28 new FileInputStream(new File(p)), cipher));
29 output = dis.readUTF() + " | " + dis.readUTF();
30 dis.close();
31
32 return output;
33 }
34}