Change a Password

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • AlexSugar
    New Member
    • Sep 2006
    • 71

    Change a Password

    Simple qustion for everyone:

    How to make possible that end user can set his own password to the "hidden" page.

    NOTES:
    - You can change a password only on the "hidden" page (Used Input Object)

    - You can "Login" on the previous page (Used Dialog)

    - The password should be saved for the next start of the application too.
  • bobbie
    Forum Member
    • Feb 2005
    • 770

    #2
    Sqlite, registry, ini file.
    All I can think of right now.

    Comment

    • TristanD
      Forum Member
      • Oct 2006
      • 314

      #3
      hi, A-SRC

      Gimme ya project.. i'll fix it (I;ve recently applied this to a project of mine )

      Comment

      • AlexSugar
        New Member
        • Sep 2006
        • 71

        #4
        Hi Tristan,

        It's a little bit impossible right now to send you my project. Me and Mr. RizlaUK do different tasks with my project. So, make a little example with 2 Pages : On the first page - A dialog object with an password (which locks the access to the next page). And on the second page you can change the password...

        PS.: You will be added to my support-team list too. You helped me much!
        Thank you.

        Comment

        • TristanD
          Forum Member
          • Oct 2006
          • 314

          #5
          the example will be using the registery for the password but the pass isn't readable from the reg
          ** working on it right now **
          Last edited by TristanD; 01-18-2007, 08:19 AM.

          Comment

          • AlexSugar
            New Member
            • Sep 2006
            • 71

            #6
            Hmm... Seem to be cool

            So if I create or change the password, the application creates a reg file to the system, right?

            Then it's excellent!

            Comment

            • TristanD
              Forum Member
              • Oct 2006
              • 314

              #7
              this project is just to broken right now .. :(:(
              Attached Files
              Last edited by TristanD; 01-18-2007, 08:53 AM. Reason: Something is wrong with this PLS Wait a sec im fixin it right now!!

              Comment

              • TristanD
                Forum Member
                • Oct 2006
                • 314

                #8
                here is a diffrent project of mine that uses a password protection...

                take a look at the startup code
                Attached Files

                Comment

                • TJ_Tigger
                  Indigo Rose Customer
                  • Sep 2002
                  • 3159

                  #9
                  The registry is not the safest place to store information like passwords. Especially in a format that can be decrypted. If you must store an encrypted version of a password in the registry I would suggest using an MD5 hash and adding random characters to it at either the beginning or end to make it more secure. This is to defeat some of the MD5 dictionary *****ers that are out there.

                  Based on the code in your First Project all I would have to do is delete the registry entry and it would appear as if it is a first run and I could enter my own password to get around it.

                  I don't have any better suggestions than the above to help in securing the app, maybe others will chime in. I would recommend MD5 over other encryption decryption formats. You may also want to see about putting a file in the directory of the app that identifies whether or not a password has been set and if it has and the registry is empty then tell them they are doing a bad thing. Just a thought

                  Tigg
                  TJ-Tigger
                  "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
                  "Draco dormiens nunquam titillandus."
                  Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

                  Comment

                  • AlexSugar
                    New Member
                    • Sep 2006
                    • 71

                    #10
                    Tristan, Save Notes 2007 seems to be good for me, but it really working bad... Even if I enter your Password-TristanD he has some syntax errors

                    Comment

                    • TristanD
                      Forum Member
                      • Oct 2006
                      • 314

                      #11
                      syntax errors?

                      Comment

                      • AlexSugar
                        New Member
                        • Sep 2006
                        • 71

                        #12
                        TJ_Tigger thank you for your suggestion, but I don't need to protect the secret information. It's just a little protection of the hidden page, where you can make some changes in the application. I think nobody will mess with it, because it is much easier to download the full version of the application and get your own password (in the future).

                        Comment

                        • TristanD
                          Forum Member
                          • Oct 2006
                          • 314

                          #13
                          Save Notes has no syntax errors........

                          Suga, This is a little complicated password protect.. For easy use.. (modify it to suit your needs)

                          Code:
                          sn_reg_entry = Registry.DoesKeyExist(HKEY_CURRENT_USER, "Software\\Save Notes 2007");
                          if sn_reg_entry == false then
                          Registry.CreateKey(HKEY_CURRENT_USER, "Software\\Save Notes 2007");
                          def_key_prompt = Dialog.Input("Please Enter a default Encryption key", "Enter Default Key below. The Encryption key you enter below will be used for encryption everything you save with this program. If you lose this key you will not be able to read or save files.", "", MB_ICONQUESTION);
                          crypt_def_pw = Crypto.BlowfishEncryptString(def_key_prompt, "def_key_prompt", 0);
                          	if def_key_prompt ~= "CANCEL" then
                          	Registry.CreateKey(HKEY_CURRENT_USER, "Software\\Save Notes 2007\\def_key");
                          	Registry.SetValue(HKEY_CURRENT_USER, "Software\\Save Notes 2007", "def_key", crypt_def_pw, REG_SZ);
                          	elseif def_key_prompt == "CANCEL" then
                          	Registry.DeleteKey(HKEY_CURRENT_USER, "Software\\Save Notes 2007");
                          	Application.Exit(0);
                          	end
                          else
                          	reg_get_key = Registry.GetValue(HKEY_CURRENT_USER, "Software\\Save Notes 2007", "def_key", false);
                          	decrypt_def_pw = Crypto.BlowfishDecryptString(reg_get_key, "def_key_prompt");
                          	def_key_input = Dialog.Input("Enter Your Encryption Key", "Enter the Encryption key you specified on first application start.", "", MB_ICONQUESTION);
                          	if def_key_input ~= "CANCEL" then
                          	def_key_check = String.Compare(decrypt_def_pw, def_key_input);
                          		if (def_key_check == -1) then
                          		def_key_error = Dialog.Message("Oops", "You did not supply the right encryption key, Program will close now", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
                          		Application.Exit(0);
                          		elseif (def_key_check == 1) then
                          		def_key_error = Dialog.Message("Oops", "You did not supply the right encryption key, Program will close now", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
                          		Application.Exit(0);
                          		end
                          	elseif def_key_input == "CANCEL" then
                          	no_key = Dialog.Message("Oops", "You did not enter a encryption key, Program will close now", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
                          		if no_key ~= "OK" then
                          		Application.Exit(0);
                          		end
                          		
                          	end
                          	
                          end
                          Last edited by TristanD; 01-18-2007, 09:19 AM.

                          Comment

                          • AlexSugar
                            New Member
                            • Sep 2006
                            • 71

                            #14
                            Yes,
                            first, I fixed a little error (you forgot an "end" on startup script) and now I get this one:

                            On Startup Line 7: attemp to index global "pw_input"



                            I meant you PASSWORD-TRISTAND

                            Not Save-Notes-2007 , sorry :lol

                            Comment

                            • AlexSugar
                              New Member
                              • Sep 2006
                              • 71

                              #15
                              Tristan,
                              I'll better use your Save-Notes-2007 script, seems to be better for my project!

                              Comment

                              Working...
                              X