Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. Imports System.Net
  2.  
  3. Public Class FormMain
  4. Dim dllname As String = ""
  5. Dim jogoexe As String = ""
  6.  
  7.  
  8.  
  9. Private Sub goAtt_Click(sender As Object, e As EventArgs) Handles Button1.Click
  10. Dim LoaderDown As WebClient = New WebClient
  11. 'Eventos down progress & down completo
  12. AddHandler LoaderDown.DownloadProgressChanged, AddressOf Atualiza_ProgressChanged
  13. AddHandler LoaderDown.DownloadFileCompleted, AddressOf Atualiza_DownloadCompleted
  14. LoaderDown.DownloadFileAsync(New Uri(LoginForm.linkdosite + dllname), Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\" & dllname)
  15. Button1.Text = "Baixando"
  16. Button1.Enabled = False
  17.  
  18. End Sub
  19.  
  20.  
  21. Private Sub Atualiza_ProgressChanged(ByVal sender As Object, ByVal e As DownloadProgressChangedEventArgs)
  22. Dim bytesIn As Double = Double.Parse(e.BytesReceived.ToString())
  23. Dim totalBytes As Double = Double.Parse(e.TotalBytesToReceive.ToString())
  24. Dim percentage As Double = bytesIn / totalBytes * 100
  25. Dim position As Integer = Int32.Parse(Math.Truncate(percentage).ToString())
  26. Label1.Text = "Atualizando loader... (" + position.ToString + "% - " + FormatBytes(bytesIn) _
  27. + "/" + FormatBytes(totalBytes)
  28. ProgressBar1.Value = position
  29. End Sub
  30. Private Sub Atualiza_DownloadCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs)
  31. Label1.Text = "Download Feito."
  32. 'Button1.Enabled = True
  33. Timer1.Start()
  34.  
  35. End Sub
  36.  
  37. Private Sub FormMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  38. If LoginForm.versao.SelectedIndex = 0 Then
  39. jogoexe = "csgo"
  40. dllname = "hack.dll"
  41. End If
  42. End Sub
  43.  
  44. Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
  45. Button1.Text = "Procurando jogo para injectar"
  46. If Process.GetProcessesByName(jogoexe).Count > 0 Then
  47.  
  48. Timer1.Stop()
  49. Inject(jogoexe, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\" & dllname)
  50. Label1.Text = "Dll injectada."
  51. Threading.Thread.Sleep(100)
  52.  
  53. Application.Exit()
  54.  
  55. End If
  56. End Sub
  57.  
  58. Private Sub FormMain_FormClosed(sender As Object, e As FormClosedEventArgs) Handles MyBase.FormClosed
  59. Application.Exit()
  60. LoginForm.Close()
  61.  
  62. End Sub
  63. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement