Jump to content

Username Password - Verification


Recommended Posts

i have an array of Usernames and an Arrays of passwords. They all are in the correct order. Im trying to figure out how to if.

   $username = array[0] then password = array2[0]

   $username = array[1] then password = array2[1]

and so on until the arrays are complete.

Can anyone point me in the right direction on how i can declare this automatically without manually typing anything in.

Thanks,

Link to comment
Share on other sites

I am pulling a list of usernames and a list of passwords from a .XML file 

when someone tried to login to my ftp using one of the usernames from a combo box. i need to verify that they type in the correct password for that username. 

So what happens if someone happens to decomplile/wiresharks your application and, finds that xml file? Does that pose a security risk at all?

Edited by BlackDawn187
Link to comment
Share on other sites

Probably looking for something along these lines, Might need some modification to work properly.

For $i = 1 To $Array[0]
   If $Username = $Array[$i] Then
      MsgBox(0. "", "", "Username Success")
      For $x = 1 To $Array2[0]
         If $Password = $Array2[$x] Then
            MsgBox(0, "", "", "Password Success")
         ElseIf $Password <> $Array2[$x] Then
            MsgBox(0, "", "", "Password Failed"
         EndIf
   ElseIf $Username <> $Array[$i] Then
        MsgBox(0, "", "", "Wrong Username")
   EndIf
Next

Edit: Updated Code

Edited by BlackDawn187
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...