Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch help  (Read 2893 times)

0 Members and 1 Guest are viewing this topic.

wowmaniac123

    Topic Starter


    Rookie

    Batch help
    « on: July 30, 2010, 11:32:02 AM »
    Hey guys. I am looking for a way to set a password in a batch script. I already know how to do this except I dont want people to be able to see the password by simply editing it in notepad. Does anyone have a solution?

    MattPwns



      Rookie

      Thanked: 1
      Re: Batch help
      « Reply #1 on: July 30, 2010, 12:29:32 PM »
      You could save it in a hidden text file, then access it with this code:

      Code: [Select]
      SET /p password= <FileName.txt
      Hope I've helped!

      wowmaniac123

        Topic Starter


        Rookie

        Re: Batch help
        « Reply #2 on: July 30, 2010, 03:14:35 PM »
        Thanks alot works fins

        ghostdog74



          Specialist

          Thanked: 27
          Re: Batch help
          « Reply #3 on: August 01, 2010, 12:28:52 AM »
          You could save it in a hidden text file, then access it with this code:

          Code: [Select]
          SET /p password= <FileName.txt
          Hope I've helped!

          right, and if someone is going to execute the batch, it will be easy to find.... what to do then?

          MattPwns



            Rookie

            Thanked: 1
            Re: Batch help
            « Reply #4 on: August 02, 2010, 11:56:12 AM »
            Okay... do you have a better solution? Batch is not secure by any means my friend...

            BradDet



              Rookie

              Thanked: 3
              Re: Batch help
              « Reply #5 on: August 02, 2010, 02:34:21 PM »
              Use Truecrypt to create an encrypted volume. (Possibly on a USB Key) (google 'TrueCrypt'

              Store the password inside the encrypted volume.  You will need to mount the volume in your userspace before the batch file will work.

              If someone reads the batch file, they can see the location of the batch file, but not read the encrypted file itself (unless they have physical access to your machine, and are logged into your userspace, in which case all bets are off anyway.
              Brad Detchevery

              vishuvishal



                Beginner
              • Thanked: 3
                Re: Batch help
                « Reply #6 on: August 02, 2010, 05:45:40 PM »
                That means we need to use a third party software?

                ghostdog74



                  Specialist

                  Thanked: 27
                  Re: Batch help
                  « Reply #7 on: August 02, 2010, 06:52:39 PM »
                  Okay... do you have a better solution? Batch is not secure by any means my friend...
                  1) Use a programming language that is able to be compiled (eg C, Perl,Python, Java etc ). BUT, this is also not 100% foolproof. However, for normal situation is sufficient to be distributed.
                  2) Design your application to give the needed user interface only. Nobody can see the source code. An example would be a web interface. All password authentication is handled at the backend.

                  Personally, i would design my application with a web/common interface.