Jump to content

change Hardcoded password


PcExpert
 Share

Recommended Posts

Hi all,

Is there a way to change a hardcoded password?

Example:

Original:

$pw = InputBox("Password Test", "Please enter your password")

If $pw = "MyPassword" then

Msgbox(64, "Password Test", "Access Granted")

Else

Msgbox(16, "Password Test", "Access Denied")

Endif

User changed password:

$pw = InputBox("Password Test", "Please enter your password")

If $pw = "MyChangedPassword" then

Msgbox(64, "Password Test", "Access Granted")

Else

Msgbox(16, "Password Test", "Access Denied")

Endif

Or is there any other way to safely store a password?

Thanks!

Link to comment
Share on other sites

  • 1 year later...

use hashes!

it's the safest thing i believe

let's suppose you have a function called MD5() that gives you an MD5 Hash of a string (you can find some of these scripts on the forum)

then what you do is this:

$pw = InputBox("Password Test", "Please enter your password")
If MD5($pw) = "847d78db803dd148cdcc22ee7c4a0205" then ;847d78db803dd148cdcc22ee7c4a0205 is an MD5 hash of MyChangedPassword
Msgbox(64, "Password Test", "Access Granted")
Else
Msgbox(16, "Password Test", "Access Denied")
Endif

the advantage in this is that you can't reverse the password (at least not in a short time... it usually takes days and loads of work)

this allows you to also store the new password (every time it's changed) as it is in an ini or a registry key. Just hash it.

cheers

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

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...