Sign in to follow this  
Followers 0
MIchaelfjsmith2

Username Password - Verification

9 posts in this topic

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,

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

if username[0] is selected then password[0] is the password so i can verify the user typed in the correct password for the username selected.

Edited by MIchaelfjsmith2

Share this post


Link to post
Share on other sites

What are you trying to accomplish with this script?

Share this post


Link to post
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. 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

not really worried about that. This is for internal use only. 

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0