Sign in to follow this  
Followers 0
TK_Incorperate

passwording programs?

16 posts in this topic

Ok i've just tried searching the help file to add a password to a program im making..... and i've come up with this right here.......

$pass = InputBox("Passwrd", "Please enter a valid password.", "fruitloop", "*M")

now in this, i was hoping fruitloop (that wasnt really it, is just an example) would be the password, and in order to run this script.... you'd need to use this, and i also put this to make sure if someone cancled the script would terminate

If @error = 1 Then
    Exit
    EndIf

now this didnt work... so i have 2 questions here....

1) How do i make the password work? i mean for this the password worked yes, but it automaticaly put the password in the input box AND! if you deleted the password, or if you put any other input it would still start the script

2) Is there any way i can make a list of passwords (sat a list of 5 maybe 10 passwords) that if any of them are used it will work?

Example for question 2:

Making it so ANY of the passwords in the password list can be used, but NOT having to enter all of them, ONLY one

Password list:

Fruitloop

Miniwheat

Cheerio

Cornflake

Sugarhoop

Share this post


Link to post
Share on other sites



Ok i've just tried searching the help file to add a password to a program im making..... and i've come up with this right here.......

$pass = InputBox("Passwrd", "Please enter a valid password.", "fruitloop", "*M")

now in this, i was hoping fruitloop (that wasnt really it, is just an example) would be the password, and in order to run this script.... you'd need to use this, and i also put this to make sure if someone cancled the script would terminate

If @error = 1 Then
    Exit
    EndIf

now this didnt work... so i have 2 questions here....

1) How do i make the password work? i mean for this the password worked yes, but it automaticaly put the password in the input box AND! if you deleted the password, or if you put any other input it would still start the script

2) Is there any way i can make a list of passwords (sat a list of 5 maybe 10 passwords) that if any of them are used it will work?

Example for question 2:

Making it so ANY of the passwords in the password list can be used, but NOT having to enter all of them, ONLY one

Password list:

Fruitloop

Miniwheat

Cheerio

Cornflake

Sugarhoop

This will work:

$Password=InputBox("Caption","Your password:","","*")
If @error Then Exit
If $Password="Fruitloop" or $Password="Miniwheat" or $Password="Cheerio" Then
;password right
Else
;password unright
EndIf

Fill in your whole password list.


Sorry for my English, I'm Dutch... =DMedia UDFINet Adv UDF

Share this post


Link to post
Share on other sites

thank you ;) very appreceated, it sucks being new at this cuz im usualy good at stuff.... and im horrible at this haha but its fun :P

Share this post


Link to post
Share on other sites

ok... critical problem, it's STILL allowing it to use anything in input.... meaning it doesnt require a password, so... i can put in saudfhsi and it'll still accept it...

is there any way to make it so it will ONLY accept those passwords??

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

well here's what my code looks like somewhat....

$Password=InputBox("Caption","Your password:","","*")
If @error Then Exit
If $Password="Fruitloop" or $Password="Miniwheat" or $Password="Cheerio" Then
;password right
Else
;password unright
EndIf

Send("{ALT}+{TAB}")
Sleep(4000)

    HotKeySet("d", "Terminate")

    While 1
        TrayTip("Title Here", "Content Here", 10)
          Send(Put Button Here)
        Sleep(Put Sleep Time Here)
    WEnd

    Func Terminate()
        Exit 0
    EndFunc

all of it works fine except for the password.....

Edit: and i know the "Put Button Here, Title Here, ect." dont work, i just put that in cuz i rounded this up just as a quick lil thing

Edited by TK_Incorperate

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

;password right
;password unright

You were supposed to edit out those comments an put your code lol, try this...

$Password=InputBox("Caption","Your password:","","*")
If @error Then Exit

If $Password = "Fruitloop" Or $Password = "Miniwheat" Or $Password = "Cheerio" Then
   MsgBox(0, "Test", "The password entered was correct")
   MsgBox(0, "Do something", "Do something when password is right")
Else
   MsgBox(0, "Test", "The password entered was incorrect")
   MsgBox(0, "Do something", "Do something when password is wrong")
EndIf

Send("{ALT}+{TAB}")
Sleep(4000)

HotKeySet("d", "Terminate")

While 1
   TrayTip("Title Here", "Content Here", 10)
   Send(Put Button Here)
   Sleep(Put Sleep Time Here)
WEnd

Func Terminate()
   Exit
EndFunc
Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

all that does is makes a window pop up.... with that i can STILL enter any password and it'll work, i want ONLY!! the passwords I CHOSE to work, how can i do this? both the ways you have said with making the boxes pop up, and the way he said without, both of them allow the script to keep running....

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Perhaps your not understanding. I used the msgbox's as an example. Change the msgbox's to what you want your script to do depending on whether the password was correct or incorrect. Its not that hard...

If $Password = "Fruitloop" Or $Password = "Miniwheat" Or $Password = "Cheerio" Then
   MsgBox(0, "Test", "The password entered was correct")
   MsgBox(0, "Do something", "Do something when password is right")
Else
   ; THE PASSWORD WAS WRONG
   Exit
EndIf
Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

thanks ;) works great... lol sorry for being a little slow on that one, i thought the "EndIf" was mant to stop the script if the password wasnt right, but thanks :P this works perfectly

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Np ;). Alternatively you could do it this way...

$Password=InputBox("Caption", "Your password:", "", "*")
If @error Then Exit

If $Password = "Fruitloop" Or $Password = "Miniwheat" Or $Password = "Cheerio" Then
   Send("{ALT}+{TAB}")
   Sleep(4000)
   HotKeySet("d", "Terminate")
   While 1
      TrayTip("Title Here", "Content Here", 10)
      Send(Put Button Here)
      Sleep(Put Sleep Time Here)
   WEnd
EndIf

Func Terminate()
   Exit
EndFunc

That way the code is contained inside the loop and no "Else" is used. Because there is no code after the EndIf that isn't located outside a function, it will exit.

If Blah
 ;Stuff
EndIf

Exit

Is the same as...

If Blah
 ;Stuff
EndIf

If there is no more code following.

Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

Is there a way to make a passworded program only work once?Like you enter the pass and then the program runs but if u want to run it again it won;t let u?

Share this post


Link to post
Share on other sites

Is there a way to make a passworded program only work once?Like you enter the pass and then the program runs but if u want to run it again it won;t let u?

Yes, but you should start a new topic for this, and be more specific.

Run once per user? per password? per system?

It can all be done using various methods.


[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

FYI for anyone making a pass. Make sure it's not a pass to anything else. It can be found out by looking at the script or even in the compiled .exe version it can be decompiled and found out. Even the decompileing pass isnt safe. So watch out. If you want to make it just a little harder try encoding the pass.

_StringEncryption() is an included func in the string.au3 in the includes.

Edit: Lol, even that isn't entirly safe...

Edited by gamerman2360

Share this post


Link to post
Share on other sites

_StringEncryption() is an included func in the string.au3 in the includes.

Edit: Lol, even that isn't entirly safe...

It's by no means more secure than storing any password directly in the script. Instead of your "real" password, you'll put the encryption password in clear into the script. So it's just one function more to call for a "hacker". Really, forget about "securing" passwords with _StringEncrypt in your scripts! It might give you a feeling of security while there is absolutely no security at all.

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Ya, true. Just know nothing in autoit is absolutely safe.

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