Trouble Loading List / Trouble Logging In

Awakening

Junior Member
Joined
Oct 9, 2012
Messages
117
Reaction score
47
I am attempting to make a mass account checker for Instagram.

I have 2 text boxes set up and when I TYPE the username + password into those boxes and press login, it works fine.
However, when I load my text file containing accounts in the format "user:pass" into two separate lists and try and log in, the log in never works. Any idea why?

I think it may be the code to load the accounts I am using which is as follows:
Code:
  Public Function LoadList()        'Declare Variables
        Dim objReader As New System.IO.StreamReader(FileLocation)
        Dim LineOfText As String = Nothing
        Dim Aryline(1) As String
        Dim FirstList As String
        Dim SecondList As String
        Do While objReader.Peek() <> -1
            LineOfText = objReader.ReadLine() & vbNewLine
            Aryline = LineOfText.Split(":")
            FirstList = Aryline(0)
            SecondList = Aryline(1)
            ListBox1.Items.Add(FirstList)
            ListBox2.Items.Add(SecondList)
            TotalAcc = TotalAcc + 1
            lblTotal.Text = TotalAcc & " Accounts Loaded"
        Loop
        'Close the Reader
        objReader.Close()
        Return Nothing
    End Function

Thanks in advance!
 
Try this...
I switched it to a Sub instead of a function since your just populating 2 listboxes.
Your also reading line by line, so there is no need to append "NewLine" character:
"LineOfText = objReader.ReadLine() & vbNewLine"
I'm fairly certain that is why your password was failing.

Code:
Public Sub LoadList()        
        Dim objReader As New System.IO.StreamReader(FileLocation)
        Dim LineOfText As String = Nothing
        Do While objReader.Peek() <> -1
            LineOfText = objReader.ReadLine()
         Dim Aryline() as String = LineOfText.Split(":")
            ListBox1.Items.Add(Aryline(0).Trim) 'Usernames
            ListBox2.Items.Add(Aryline(1).Trim) 'Passwords
            lblTotal.Text = ListBox1.Items.Count & " Accounts Loaded"
        Loop
        'Close the Reader
        objReader.Close()
End Sub
 
Last edited:
Ahh! Thank you a lot for that.

It's working now.
 
Back
Top