Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- ' Button1.Enabled = False
- ' login = 1
- ' Try
- ' WebBrowser1.Document.GetElementById("username").SetAttribute("value", TextBox1.Text)
- ' WebBrowser1.Document.GetElementById("password").SetAttribute("value", TextBox2.Text)
- ' WebBrowser1.Document.GetElementById("submit").InvokeMember("click")
- ' Catch
- ' ' MsgBox("Login Error: Please click 'trouble logging in' log in and press 'All done' at bottom left", vbCritical)
- ' End Try
- ' Try
- ' WebBrowser3.Document.GetElementById("username").SetAttribute("value", TextBox1.Text)
- ' WebBrowser3.Document.GetElementById("hwidin").SetAttribute("value", TextBox3.Text)
- ' WebBrowser3.Document.GetElementById("submit").InvokeMember("click")
- ' Catch
- ' 'MsgBox("Login Error: Please click 'trouble logging in' log in and press 'All done' at bottom left", vbCritical)
- ' End Try
- 'End Sub
- '' Login check
- 'Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
- ' If login = 1 Then
- ' login = 0
- ' Try
- ' Label4.Text = "Current Status: Checking password"
- ' If WebBrowser1.DocumentText.Contains("<p>You have successfully been logged in") Then
- ' Label4.Text = "Current Status: Password accepted"
- ' confirmhwid = 1
- ' Else
- ' Label4.ForeColor = Color.Red
- ' Label4.Text = "Current Status: Password rejected!"
- ' WebBrowser1.Navigate("http://absense.tk/forums/member.php?action=login")
- ' MsgBox("Error: Username or password is incorrect", vbCritical)
- ' Thread.Sleep(250)
- ' Button1.Enabled = True
- ' End If
- ' Catch ex As Exception
- ' MsgBox("Login Error: Please click 'trouble logging in' log in and press 'All done' at bottom left", vbCritical)
- ' End Try
- ' End If
- 'End Sub
- '' HWID check
- 'Private Sub WebBrowser3_DocumentCompleted_1(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser3.DocumentCompleted
- ' If confirmhwid = 1 Then
- ' confirmhwid = 0
- ' Try
- ' Label4.Text = "Current Status: Checking HWID"
- ' If WebBrowser3.DocumentText.Contains("HWID is correct") Then
- ' Label4.Text = "Current Status: HWID accepted!"
- ' If (CheckBox1.Checked = True) Then
- ' My.Settings.check = True
- ' ElseIf (CheckBox1.Checked = False) Then
- ' My.Settings.check = False
- ' End If
- ' My.Settings.username = TextBox1.Text
- ' My.Settings.password = TextBox2.Text
- ' My.Settings.Save()
- ' WebBrowser1.Navigate("about:blank")
- ' WebBrowser3.Navigate("about:blank")
- ' TextBox1.Text = ""
- ' TextBox2.Text = ""
- ' TextBox1.Focus()
- ' Form2.Show()
- ' Me.Hide()
- ' Button1.Enabled = True
- ' Else
- ' If WebBrowser3.DocumentText.Contains("HWID is not correct") Then
- ' WebBrowser1.Navigate("http://absense.tk/forums/member.php?action=login")
- ' WebBrowser3.Navigate("http://absense.tk/forums/hwid.php")
- ' Label4.ForeColor = Color.Red
- ' Label4.Text = "Current Status: HWID rejected!"
- ' MsgBox("Error: HWID is incorrect", vbCritical)
- ' Thread.Sleep(250)
- ' Button1.Enabled = True
- ' Else
- ' If WebBrowser3.DocumentText.Contains("") Then
- ' WebBrowser1.Navigate("http://absense.tk/forums/member.php?action=login")
- ' WebBrowser3.Navigate("http://absense.tk/forums/hwid.php")
- ' Label4.ForeColor = Color.Red
- ' Label4.Text = "Current Status: HWID rejected!"
- ' MsgBox("Error: No user with that name (HWID)", vbCritical)
- ' Thread.Sleep(250)
- ' Button1.Enabled = True
- ' End If
- ' End If
- ' End If
- ' Catch ex As Exception
- ' MsgBox("HWID Error: contact admin", vbCritical)
- ' End Try
- ' End If
- 'End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement