MIchaelfjsmith2 Posted February 9, 2014 Posted February 9, 2014 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,
JohnOne Posted February 9, 2014 Posted February 9, 2014 "typing anything in" where? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
MIchaelfjsmith2 Posted February 9, 2014 Author Posted February 9, 2014 (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 February 9, 2014 by MIchaelfjsmith2
JohnOne Posted February 9, 2014 Posted February 9, 2014 _ArraySearch() AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
BlackDawn187 Posted February 9, 2014 Posted February 9, 2014 What are you trying to accomplish with this script?
MIchaelfjsmith2 Posted February 9, 2014 Author Posted February 9, 2014 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.
BlackDawn187 Posted February 9, 2014 Posted February 9, 2014 (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 February 9, 2014 by BlackDawn187
MIchaelfjsmith2 Posted February 9, 2014 Author Posted February 9, 2014 not really worried about that. This is for internal use only.
BlackDawn187 Posted February 9, 2014 Posted February 9, 2014 (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 February 9, 2014 by BlackDawn187
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now