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 29329 times)

0 Members and 1 Guest are viewing this topic.

Dias de verano

  • Guest
Re: Input hiding (different from password hiding)
« Reply #15 on: April 19, 2009, 03:34:54 AM »
so do you have a problem with that?

In a word, yes.

Quote
or are you purposely being irritating?

In another word, yes.

Quote
take a hike. (or take your medicine if you haven't)

Demonstrating that "Dawk" was an apposite comment.





gh0std0g74



    Apprentice

    Thanked: 37
    Re: Input hiding (different from password hiding)
    « Reply #16 on: April 19, 2009, 05:07:58 AM »
    In a word, yes.
    until the day this forum specifically prohibits any kind of tools/languages to use except batch solution, you just have to suck it up.


    Dias de verano

    • Guest
    Re: Input hiding (different from password hiding)
    « Reply #17 on: April 19, 2009, 05:09:18 AM »
    It all gets me nearer to 5000...

    Helpmeh

      Topic Starter


      Guru

    • Roar.
    • Thanked: 123
      • Yes
      • Yes
    • Computer: Specs
    • Experience: Familiar
    • OS: Windows 8
    Re: Input hiding (different from password hiding)
    « Reply #18 on: April 19, 2009, 08:17:30 AM »
    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?
    I am trying to MASK the input at a prompt. I'm currently using set /p, but when a user enters their password, it shows up as letters. Someone could "casually" look over their shoulder and see their password. Like the Passwordbox in VB2008 replaces any entered letters with * (or dots depending on version).

    So I should use gawk for this? Is it a single executable file (I won't be able to install anything, but I can place single .exe s in a file)?
    Where's MagicSpeed?
    Quote from: 'matt'
    He's playing a game called IRL. Great graphics, *censored* gameplay.

    Dias de verano

    • Guest
    Re: Input hiding (different from password hiding)
    « Reply #19 on: April 19, 2009, 08:51:46 AM »
    Attached is a zip containing getpassword.exe which I wrote myself. To reassure yourself, do a virus scan before running. Crude but it works OK for a batch type project.

    Writes the typed password into a file in the same folder called password.txt which you should read and delete immediately.

    use it like this

    test.bat

    Code: [Select]
    @echo off
    echo Password demo
    echo.
    echo We will now ask for a password
    echo.
    getpassword.exe
    for /f "delims=" %%P in (password.txt) do set password=%%P
    del password.txt
    echo the password typed was %password%


    Code: [Select]
    S:\Test\Basic\pword>test
    Password demo

    We will now ask for a password

    Enter password : ***
    the password typed was cat




    [attachment deleted by admin]

    Helpmeh

      Topic Starter


      Guru

    • Roar.
    • Thanked: 123
      • Yes
      • Yes
    • Computer: Specs
    • Experience: Familiar
    • OS: Windows 8
    Re: Input hiding (different from password hiding)
    « Reply #20 on: April 19, 2009, 08:58:28 AM »
    Attached is a zip containing getpassword.exe

    use it like this

    Code: [Select]
    @echo off
    echo Password demo
    echo.
    echo We will now ask For a password
    echo.
    getpassword.exe
    for /f "delims=" %%P in (password.txt) do set password=%%P
    del password.txt
    echo the password typed was %password%

    THANKS SO MUCH!
    Where's MagicSpeed?
    Quote from: 'matt'
    He's playing a game called IRL. Great graphics, *censored* gameplay.

    gh0std0g74



      Apprentice

      Thanked: 37
      Re: Input hiding (different from password hiding)
      « Reply #21 on: April 19, 2009, 09:36:42 AM »
      So I should use gawk for this?
      no.

      Helpmeh

        Topic Starter


        Guru

      • Roar.
      • Thanked: 123
        • Yes
        • Yes
      • Computer: Specs
      • Experience: Familiar
      • OS: Windows 8
      Re: Input hiding (different from password hiding)
      « Reply #22 on: April 19, 2009, 09:51:20 AM »
      no.
      Thanks anyway, Dias gave me the solution.
      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 #23 on: April 19, 2009, 02:35:13 PM »
        I remember there was one member a year ago with "dog" in their username that was good with VBScript.
        If you dont know DOS, you dont know Windows...

        Thats why Bill Gates created the Windows NT Family.

        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 #24 on: April 19, 2009, 05:11:23 PM »
        Is there not a thing you can call in a batch file that returns just a single char from the keyboard?
        So you do some thing like this. (Written iN GOBL)
        Get a key press
        save it to a STRING variable.
        generate a backspace
        generate a
        loop:
        Get next keypress
        if end of line then  jump done:
          add to STRING variable.
          generate a backspace
          generate a
          goto loop
        done:



        Helpmeh

          Topic Starter


          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Input hiding (different from password hiding)
        « Reply #25 on: April 19, 2009, 05:26:59 PM »
        Is there not a thing you can call in a batch file that returns just a single char from the keyboard?
        So you do some thing like this. (Written iN GOBL)
        Get a key press
        save it to a STRING variable.
        generate a backspace
        generate a
        loop:
        Get next keypress
        if end of line then  jump done:
          add to STRING variable.
          generate a backspace
          generate a
          goto loop
        done:



        Should I put that the solution was found already???
        Thanks anyway, Dias gave me the solution.

        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        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 #26 on: April 19, 2009, 05:39:40 PM »
        Quote
        Should I put that the solution was found already???

        Don't you already know I can not read?

        Helpmeh

          Topic Starter


          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: Input hiding (different from password hiding)
        « Reply #27 on: April 19, 2009, 05:41:16 PM »
        Don't you already know I can not read?
        I do...I just felt like rubbing it in...
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        Batcher



          Rookie

          Thanked: 5
          Re: Input hiding (different from password hiding)
          « Reply #28 on: April 19, 2009, 09:41:20 PM »
          Code: [Select]
          @echo off
          set RealPwd=Batcher
          >"%tepm%\in.com" echo hP1X500P[PZBBBfh#b##fXf-V@`$fPf]f3/f1/5++u5x
          set /p InputPwd=Enter password: <nul
          for /f "tokens=*" %%a in ('"%tepm%\in.com"') do (
            set "InputPwd=%%a"
          )
          echo.
          if "%RealPwd%" equ "%InputPwd%" (
            echo Correct password.
          ) else (
            echo Incorrect password.
          )
          pause

          BC_Programmer


            Mastermind
          • Typing is no substitute for thinking.
          • Thanked: 1140
            • Yes
            • Yes
            • BC-Programming.com
          • Certifications: List
          • Computer: Specs
          • Experience: Beginner
          • OS: Windows 11
          Re: Input hiding (different from password hiding)
          « Reply #29 on: April 19, 2009, 11:31:21 PM »
          *Modifies BCScripts Scripting Object to take a password char with ReadLn()*
          I was trying to dereference Null Pointers before it was cool.