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

Author Topic: Input hiding (different from password hiding)  (Read 29316 times)

0 Members and 1 Guest are viewing this topic.

Helpmeh

    Topic Starter


    Guru

  • Roar.
  • Thanked: 123
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 8
Input hiding (different from password hiding)
« on: April 16, 2009, 03:08:19 PM »
In batch, a user will be entering a password to allow them access, but I want it so someone looking over their shoulder can't see the password (sortof like...not sort of like, exactly like password masking in VB)...

I saw this a while ago, but I can't find it anymore  :-\.

I can use a 3rd party program, but it has to be a very small file size (as small as possible!)
« Last Edit: April 22, 2009, 07:16:17 PM by Helpmeh »
Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.

macdad-



    Expert

    Thanked: 40
    Re: Input hiding (different from password hiding)
    « Reply #1 on: April 16, 2009, 08:04:03 PM »
    Here  ;)
    If you dont know DOS, you dont know Windows...

    Thats why Bill Gates created the Windows NT Family.

    Prince_



      Beginner

      Thanked: 5
      Re: Input hiding (different from password hiding)
      « Reply #2 on: April 17, 2009, 06:51:19 AM »
      Code: [Select]
      @echo off & setlocal        %CheckPWD {[email protected] 2008-12-12}%

      echo Password:
      call :CheckPWD p1 123456 *
      echo.
      if errorlevel 1 (echo %p1% - No) else (echo %p1% - Yes)

      echo.

      echo Password:
      call :CheckPWD p2 123456
      if errorlevel 1 (echo %p2% - No) else (echo %p2% - Yes)

      pause & goto :eof






      :CheckPWD
      setlocal & if "%~2"=="" exit /b 1

      for /f "tokens=1 delims=:" %%a in ('findstr /nrc:"^e100 B7 2A 80" "%~f0"') do set /a n=%%a-1
      more /e +%n%<"%~f0" | debug>nul

      if "%~3"=="" x>nul
      if "%~3" neq "" set c=%~3 & call set "c=%%c:~0,1%%"
      if "%~3" neq "" x %c%

      for /f %%a in ('x -o') do set "p=%%a"

      endlocal & set "%~1=%p%" & del x.com & if "%~2"=="%p%" (exit /b 0) else (exit /b 1)

      e100 B7 2A 80 3E 80 00 00 74 22 80 3E 80 00 02 75 06
      e110 8A 3E 82 00 EB 15 83 E0 00 8E D8 80 3E 00 02 00
      e120 74 6A BA 01 02 B4 09 CD 21 EB 61 83 E6 00 8E C6
      e130 80 E4 00 CD 16 8A D8 80 FB 1B 75 08 26 80 26 00
      e140 02 00 EB 48 80 FB 0D 74 37 80 FB 08 75 1A 83 FE
      e150 00 74 DD B2 08 B4 02 CD 21 B2 20 B4 02 CD 21 B2
      e160 08 B4 02 CD 21 4E EB C8 80 FB 21 72 C3 80 FB 7E
      e170 77 BE 8A D7 B4 02 CD 21 26 88 9C 01 02 46 EB B0
      e180 26 C6 84 01 02 24 26 C6 06 00 02 24 B8 00 4C CD
      e190 21
      nx.com
      rcx
      91
      w
      q

      Helpmeh

        Topic Starter


        Guru

      • Roar.
      • Thanked: 123
        • Yes
        • Yes
      • Computer: Specs
      • Experience: Familiar
      • OS: Windows 8
      Re: Input hiding (different from password hiding)
      « Reply #3 on: April 18, 2009, 02:34:44 PM »
      Here  ;)
      Thanks macdad, but I'm afraid that won't work (or I don't know how it could work). What I happens is the user enter's their username, then their password. If the username and password don't match a line in a file, then the user tries again, or gives up...Is there a way that it can MASK the input (like in visual basic), instead of doing it letter by letter?
      Where's MagicSpeed?
      Quote from: 'matt'
      He's playing a game called IRL. Great graphics, *censored* gameplay.

      macdad-



        Expert

        Thanked: 40
        Re: Input hiding (different from password hiding)
        « Reply #4 on: April 18, 2009, 03:22:40 PM »
        I believe it may be possible in VBScript.
        If you dont know DOS, you dont know Windows...

        Thats why Bill Gates created the Windows NT Family.

        Helpmeh

          Topic Starter


          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Input hiding (different from password hiding)
        « Reply #5 on: April 18, 2009, 04:16:12 PM »
        I believe it may be possible in VBScript.
        I know absolutely nothing (usefull) in VBScript...can you show me how to/make it?
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        macdad-



          Expert

          Thanked: 40
          Re: Input hiding (different from password hiding)
          « Reply #6 on: April 18, 2009, 04:37:11 PM »
          I'm not knowledgeable in VBScript either.   :P

          I think Ghostdog is good with it though.

          If you dont know DOS, you dont know Windows...

          Thats why Bill Gates created the Windows NT Family.

          Helpmeh

            Topic Starter


            Guru

          • Roar.
          • Thanked: 123
            • Yes
            • Yes
          • Computer: Specs
          • Experience: Familiar
          • OS: Windows 8
          Re: Input hiding (different from password hiding)
          « Reply #7 on: April 18, 2009, 04:51:28 PM »
          I'm not knowledgeable in VBScript either.   :P

          I think Ghostdog is good with it though.


          So, should I post this in "Computer Programming"?
          Where's MagicSpeed?
          Quote from: 'matt'
          He's playing a game called IRL. Great graphics, *censored* gameplay.

          macdad-



            Expert

            Thanked: 40
            Re: Input hiding (different from password hiding)
            « Reply #8 on: April 18, 2009, 04:57:49 PM »
            Your decision.
            If you dont know DOS, you dont know Windows...

            Thats why Bill Gates created the Windows NT Family.

            Helpmeh

              Topic Starter


              Guru

            • Roar.
            • Thanked: 123
              • Yes
              • Yes
            • Computer: Specs
            • Experience: Familiar
            • OS: Windows 8
            Re: Input hiding (different from password hiding)
            « Reply #9 on: April 18, 2009, 05:04:05 PM »
            Your decision.
            Just did. Thanks for your help macdad-!
            Where's MagicSpeed?
            Quote from: 'matt'
            He's playing a game called IRL. Great graphics, *censored* gameplay.

            Reno



              Hopeful
            • Thanked: 32
              Re: Input hiding (different from password hiding)
              « Reply #10 on: April 18, 2009, 10:51:39 PM »
              I'm not knowledgeable in VBScript either.   :P

              I think Ghostdog is good with it though.
              ghostdog will only suggest you:
              - installs gawk, see my sig
              - if you are able to download stuffs, you can use sed (check my sig for link).
              - if you want to do programming/batching on windows, get a real programming language.
              - Switch to *nix then.
              -there are abundance of tools out there you can use. the unix Find command , which is ported to windows makes this kind of task seem trivial.
              - and many more

              Geek-9pm


                Mastermind
              • Geek After Dark
              • Thanked: 1026
                • Gekk9pm bnlog
              • Certifications: List
              • Computer: Specs
              • Experience: Expert
              • OS: Windows 10
              Re: Input hiding (different from password hiding)
              « Reply #11 on: April 18, 2009, 11:03:59 PM »
              That looks very hard to do.  What is the ovjective?
              You want the user to type in a passwrod at a prompt from inside a batrch?
              The input must not have echo or just *** maybe?
              The batch file can retrieve the password from some place the average user would not guess. Right?

              gh0std0g74



                Apprentice

                Thanked: 37
                Re: Input hiding (different from password hiding)
                « Reply #12 on: April 19, 2009, 02:39:08 AM »
                ghostdog will only suggest you:
                for your info, i do give solutions in vbscript sometimes. see here.

                Quote
                - Switch to *nix then.
                don't put words in my mouth.
                as for your other comment, i can only say, I advocate using right tools for the job ->> productivity.

                @helpmeh, see your other post and also here



                Dias de verano

                • Guest
                Re: Input hiding (different from password hiding)
                « Reply #13 on: April 19, 2009, 02:57:37 AM »
                ghostdog will only suggest you:
                - installs gawk, see my sig
                - if you are able to download stuffs, you can use sed (check my sig for link).
                - if you want to do programming/batching on windows, get a real programming language.
                - Switch to *nix then.
                -there are abundance of tools out there you can use. the unix Find command , which is ported to windows makes this kind of task seem trivial.
                - and many more

                He surpassed himself in the other thread about this topic started by Helpmeh, by posting a link to Experts Exchange (plus the inevitable Perl script)

                gawk, or dawk?



                gh0std0g74



                  Apprentice

                  Thanked: 37
                  Re: Input hiding (different from password hiding)
                  « Reply #14 on: April 19, 2009, 03:17:58 AM »
                  He surpassed himself in the other thread about this topic started by Helpmeh, by posting a link to Experts Exchange (plus the inevitable Perl script)

                  gawk, or dawk?



                  so do you have a problem with that? or are you purposely being irritating? take a hike. (or take your medicine if you haven't)