Advertisement
Jahanzaib_bokhari

Old Login

Dec 16th, 2018
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 4.80 KB | None | 0 0
  1. 'Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  2.     '    Button1.Enabled = False
  3.     '    login = 1
  4.  
  5.     '    Try
  6.     '        WebBrowser1.Document.GetElementById("username").SetAttribute("value", TextBox1.Text)
  7.     '        WebBrowser1.Document.GetElementById("password").SetAttribute("value", TextBox2.Text)
  8.     '        WebBrowser1.Document.GetElementById("submit").InvokeMember("click")
  9.     '    Catch
  10.     '        ' MsgBox("Login Error: Please click 'trouble logging in' log in and press 'All done' at bottom left", vbCritical)
  11.     '    End Try
  12.  
  13.     '    Try
  14.     '        WebBrowser3.Document.GetElementById("username").SetAttribute("value", TextBox1.Text)
  15.     '        WebBrowser3.Document.GetElementById("hwidin").SetAttribute("value", TextBox3.Text)
  16.     '        WebBrowser3.Document.GetElementById("submit").InvokeMember("click")
  17.     '    Catch
  18.     '        'MsgBox("Login Error: Please click 'trouble logging in' log in and press 'All done' at bottom left", vbCritical)
  19.     '    End Try
  20.     'End Sub
  21.  
  22.     '' Login check
  23.     'Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
  24.     '    If login = 1 Then
  25.     '        login = 0
  26.     '        Try
  27.     '            Label4.Text = "Current Status: Checking password"
  28.     '            If WebBrowser1.DocumentText.Contains("<p>You have successfully been logged in") Then
  29.     '                Label4.Text = "Current Status: Password accepted"
  30.     '                confirmhwid = 1
  31.     '            Else
  32.     '                Label4.ForeColor = Color.Red
  33.     '                Label4.Text = "Current Status: Password rejected!"
  34.     '                WebBrowser1.Navigate("http://absense.tk/forums/member.php?action=login")
  35.     '                MsgBox("Error: Username or password is incorrect", vbCritical)
  36.     '                Thread.Sleep(250)
  37.     '                Button1.Enabled = True
  38.     '            End If
  39.     '        Catch ex As Exception
  40.     '            MsgBox("Login Error: Please click 'trouble logging in' log in and press 'All done' at bottom left", vbCritical)
  41.     '        End Try
  42.     '    End If
  43.     'End Sub
  44.  
  45.     '' HWID check
  46.     'Private Sub WebBrowser3_DocumentCompleted_1(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser3.DocumentCompleted
  47.     '    If confirmhwid = 1 Then
  48.     '        confirmhwid = 0
  49.     '        Try
  50.     '            Label4.Text = "Current Status: Checking HWID"
  51.     '            If WebBrowser3.DocumentText.Contains("HWID is correct") Then
  52.     '                Label4.Text = "Current Status: HWID accepted!"
  53.  
  54.     '                If (CheckBox1.Checked = True) Then
  55.     '                    My.Settings.check = True
  56.     '                ElseIf (CheckBox1.Checked = False) Then
  57.     '                    My.Settings.check = False
  58.     '                End If
  59.  
  60.     '                My.Settings.username = TextBox1.Text
  61.     '                My.Settings.password = TextBox2.Text
  62.     '                My.Settings.Save()
  63.     '                WebBrowser1.Navigate("about:blank")
  64.     '                WebBrowser3.Navigate("about:blank")
  65.     '                TextBox1.Text = ""
  66.     '                TextBox2.Text = ""
  67.     '                TextBox1.Focus()
  68.  
  69.     '                Form2.Show()
  70.     '                Me.Hide()
  71.     '                Button1.Enabled = True
  72.     '            Else
  73.     '                If WebBrowser3.DocumentText.Contains("HWID is not correct") Then
  74.     '                    WebBrowser1.Navigate("http://absense.tk/forums/member.php?action=login")
  75.     '                    WebBrowser3.Navigate("http://absense.tk/forums/hwid.php")
  76.     '                    Label4.ForeColor = Color.Red
  77.     '                    Label4.Text = "Current Status: HWID rejected!"
  78.     '                    MsgBox("Error: HWID is incorrect", vbCritical)
  79.     '                    Thread.Sleep(250)
  80.     '                    Button1.Enabled = True
  81.     '                Else
  82.     '                    If WebBrowser3.DocumentText.Contains("") Then
  83.     '                        WebBrowser1.Navigate("http://absense.tk/forums/member.php?action=login")
  84.     '                        WebBrowser3.Navigate("http://absense.tk/forums/hwid.php")
  85.     '                        Label4.ForeColor = Color.Red
  86.     '                        Label4.Text = "Current Status: HWID rejected!"
  87.     '                        MsgBox("Error: No user with that name (HWID)", vbCritical)
  88.     '                        Thread.Sleep(250)
  89.     '                        Button1.Enabled = True
  90.     '                    End If
  91.     '                End If
  92.     '            End If
  93.     '        Catch ex As Exception
  94.     '            MsgBox("HWID Error: contact admin", vbCritical)
  95.     '        End Try
  96.     '    End If
  97.     'End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement