Menu

New command line option

Satan
2007-11-09
2012-09-17
  • Satan

    Satan - 2007-11-09

    Hi

    I tend to "scriptise" my system (XP) a lot, and I'm using batches which execute certain programs, which connect to certain servers.
    I would really welcome ability to get passwords via command line.
    Example: pwsafe -get Group:Entry:Login -sec mysecretdbpassword
    which would simply return a password without opening pwsafe window

    Then I would prepare scripts to ask me for my secret password, using for example set command:
    set /p secretpass=Enter your password:
    after this system variable secretpass would contain my secretpassword, which i could use then here and there in script,
    after script executes:
    set secretpass=
    would remove its value

    example putty connection:
    start putty -load "Profile" -l login -pw server_password

    could be done
    set /p secretpass=Enter your password:
    start putty -load "Profile" -l login -pw %secretpass%
    set secretpass=

    That would be much easier, then click on tray, enter security password, find node in tree, right click, copy password, paste it to putty window. Besides some servers doesn't give me much time to answer (like disconnect after 10 second when password was not entered), and sometimes I forgot to first copy password to Clipboard

    Please consider this, automation is a key for sucessfull (and faster) work :P

     
    • Satan

      Satan - 2007-11-09

      Heh, kill me, but maybe you should consider very advanced command line to allow scripts to get any kind of data they want (ex. all logins from Internet:Services group) - but i don't know why this could be usefull :P

      Next more I think usefull ability would be to allow adding entries to pwsafe.
      Example I write:
      pwsafe -add Internet:Services:PayPal:somelogin
      And it creates the group - Internet:Services, adds entry PayPal with login set to somelogin and generates password, and automatically puts it to clipboard :P so in fact I wouldn't even know what the password is (after pasting it to password box on site).

       
    • Satan

      Satan - 2007-11-09

      Of course Its not correct
      at least one line is missing,
      it should be done either by:
      start putty -load "Profile" -l login -pw pwsafe -get Group:Entry:Login -sec %secretpass%
      or by using another temporary system variable

       
    • Rony Shapiro

      Rony Shapiro - 2007-11-09

      Interesting idea - worth thinking about.

      For putty, though, you might want to consider the pageant utility that comes as part of the putty package.

      Rony

       
    • Satan

      Satan - 2007-11-09

      pageant - true, I'm using it with some of servers, but
      a) its not always possible for me to configure SSH auth with some servers
      b) there are other programs, at least command line tools like telnet and ftp - i could for example write script to upload/download files from comand line. In this situation getting out a url would also be a good idea :)

      Whoa, ideas... ideas... - with not much fuzz I could write script (or set of them) to send some file via email (by telnet, i guess it would be possible) using one of chosen accounts (I sometimes really hate to turn on my mail client, when someone needs something fast, and I'm in the middle of interesting online game... that is work of course :P).

      And the best thing would be that all passwords would still be safe and stored in one place !

       

Log in to post a comment.