Jump to content

_Password()


AlmarM
 Share

Recommended Posts

Hello,

I made this little and simple but MAYBY usefull password function.

Password.au3

Func _Password($aPassword)
    $Pass = InputBox("Password", "Typ the password here.", "", "*")
    If ($Pass == $aPassword) Then
        MsgBox(64, "Correct", "You have entered the correct password!")
    Else
        MsgBox(16, "Wrong", "You have entered the wrong password!")
        Exit
    EndIf
EndFunc

-AlmarM-

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

Nice script but the password is easy to get as we can decompile .exe and just take it :)

That's enough talk about decompiling.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

You can't decompile an exe. Can you?

Yes, actually we can. It would be good if you made a 25x protection inside the script, something that checks almost every other line to make sure people can't just simply remove a few lines or functions. Also, make sure the password is stored in the script a non-reversable way (using MD5), and fragmented so it's hard for someone to get the initial MD5.
Link to comment
Share on other sites

Yes, actually we can. It would be good if you made a 25x protection inside the script, something that checks almost every other line to make sure people can't just simply remove a few lines or functions. Also, make sure the password is stored in the script a non-reversable way (using MD5), and fragmented so it's hard for someone to get the initial MD5.

Wow, I thought that you can't decompile anything.. Thanks.

code
Link to comment
Share on other sites

Hehe, I said so... A simple and easy but MAYBY usefull password protection.

And you CANT decompile :)

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

If this discussion about decompiling keeps up I will be waiting for the "Click". All of the regulars are aware that it is a forbidden topic.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Hehe, I said so... A simple and easy but MAYBY usefull password protection.

And you CANT decompile :)

I'm not saying you are being ignorant, but maybe you should do some research on the topic before you say something.

And I'm not saying this to encourage anyone to learn how to decompile. I am acting only in the interest of those who have considered using this.

Link to comment
Share on other sites

Hehe, I said so... A simple and easy but MAYBY usefull password protection.

And you CANT decompile :)

You CAN decompile AutoIt "programs"; however, you CAN'T decompile programs written in a programming language into its original language (you can get the assembly, however). AutoIt is a scripting language - an interpreted language - thus it is never really "compiled" in the first place.
Link to comment
Share on other sites

id also like to state, that if i read this correctly, it will not check if the password was entered in the correct case.

edit: or the chars individually

:) Replace: = with ==

Case sensitive:

Func _Password($aPassword)
    $Pass = InputBox("Password", "Typ the password here.", "", "*")
    If ($Pass == $aPassword) Then
        MsgBox(64, "Correct", "You have entered the correct password!")
    Else
        MsgBox(16, "Wrong", "You have entered the wrong password!")
        Exit
    EndIf
EndFunc
Link to comment
Share on other sites

Scripts can be decompiled. At one time we provided a tool to do so. We no longer do so but there are those out there who have figured out how to decompile scripts.

So, use this at your own risk. This is only keeping the honest people honest because any mildly determined individual can gain access to the script exposing the password. That holds true for storing any sensitive data in a script.

Now, no more decompilation discussion.

Link to comment
Share on other sites

General Concept expanded. Total number of possible tries is now 3. Added a time-out function (10seconds). MD5 is easy with the MD5 plugin posted a while back, but I wanted to keep it totally AutoIt. :)

password.au3

Func _Password($aPassword)
    $try = 0
    While 1
        $Pass = InputBox("Password", "Type the password here.", "", "*M", -1, -1, -1, -1, 10)
        If ($Pass == $aPassword) Then
            MsgBox(64, "Correct", "You have entered the correct password!")
        ElseIf @error = 1 or @error = 2 Then
            MsgBox(16, "Canceled", "Cancelled because timeout was reached, or cancel button was pressed.")
            Exit
        Else
            If $try = 2 Then
                MsgBox(16, "Wrong", "You have entered the wrong password more than 3 times!")
                Exit
            Else
                $try += 1
                If (3-$try) = 1 Then
                    $trytex = (3-$try) & " try left"
                Else
                    $trytex = (3-$try) & " tries left"
                EndIf
                MsgBox(16, "Wrong", "You have entered the wrong password! You have " & $trytex)
            EndIf
        EndIf
    WEnd
EndFunc  ;==>_Password
Link to comment
Share on other sites

  • Moderators

Hmmmm. Many discousions about the decompile >.<

Yes, and you were asked by a developer/moderator two posts up not to mention it anymore. Since this is your thread, I'll flat out ask you specifically not to discuss it anymore, or we will lock this thread. Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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