Menu

Disguising passwords in command line app

2005-06-10
2012-12-08
  • Tom Cumming

    Tom Cumming - 2005-06-10

    Whenever I create or extract password-protected archives using the 7-Zip command line program, the password prompt is not disguised with ** or anything - the password I type appears on the screen for anyone to look over my shoulder at. Is there any way I can prevent this, short of changing the display colours to black on black?
    Many thanks.

     
    • Igor Pavlov

      Igor Pavlov - 2005-06-10

      No way now. Use GUI instead.

       
    • Tom Cumming

      Tom Cumming - 2005-06-15

      I'm running it from a batch job, so I cannot use the GUI. The fact it has a command line interface is why I started using 7-Zip!

       
    • Nobody/Anonymous

      The solution could be this (the source needs to be modifyed):
      if one wants to extract a .7z archive and password switch is not present the program asks user for the password. And while he is typing it, it is not shown or every input key is shown as *.

       
      • Tom Cumming

        Tom Cumming - 2005-06-16

        That was what I was thinking - but I'm only an end user ;)

         
    • Nobody/Anonymous

      If you're running in a batch job under windows then put an at sing ( @) at the beginning of the line so it doesn't echo your command to the screen.
      Also put the following atfer the command:
      > @echo 2>&1

      @echo doesn't take an input this way so the screen output (and error output) that is passed to it is abondonded and doesn't appear anywhere.

       
    • Nobody/Anonymous

      What is the error when you try to extract the file?
      If you get "wrong password" or even better "password switch not specified" it would be very easy - I think.

      I could try to do it but now it's exams period over here. Maby next month.

       

Log in to post a comment.