Jump to content
Sign in to follow this  
b1t5tR3@m

Password Validation

Recommended Posts

I've been searching the forums and have yet to run across a script addressing simple Password Validation. Nothing fancy or elaborate, doesn't even need to loop for the user to keep trying. Just a simple script front-end for the rest of the script, requiring an authenticated password before continuing.

I know this may be extremely simple for a few of you, and nothing spectacular...however I would appreciate any help offered.

Thnkx

Share this post


Link to post
Share on other sites

$sPass = 'My secret password'

Do 
   $sInput = InputBox( "Password", "Insert password to continue"& @lf &"The password is CaSe SeNSiTIve." , "" , ".")
   If @error Then Exit
Until $sPass == $sInput

;Real script here. Remember to deactivate decompiling when compiling.

Edited by ezzetabi

Share this post


Link to post
Share on other sites

With a simple error message:

$sPass = 'My secret password'

Do
   $sInput = InputBox( "Password", "Insert password to continue" & @LF & "The password is CaSe SeNSiTIve.", "", ".")
   If @error Then Exit
   
   If $sPass == $sInput Then ExitLoop
   
   MsgBox(4096 + 16, 'Error!', 'Password didn''t match.' & @LF & 'Try again.')
Until 0

Share this post


Link to post
Share on other sites
Guest Py7|-|[]/\/

You could morph that into a for loop if you only want to allow a certain amount of tries.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...