Menu

#12 stdin is accepted as password

v1.0 (example)
closed-invalid
None
5
2014-04-19
2014-03-27
Bram
No

Users should not be tempted to do something like this:

$ echo mypassword | kpcli --kdb my.kdb

I'm not a perl expert... but eating all the keys right before displaying the password prompt, would solve it:

*** 2711,2720 ****
--- 2711,2723 ----
    }

    $|=1; # Needed to flush STDOUT on Windows cmd prior to calling ReadMode
    ReadMode('noecho');
    ReadMode('raw');

+ 
+   while (defined ReadKey(-1)) {}; # eats up keys in buffer 
+ 
    my $master_pass = '';
    print $prompt;
    CHAR: while (1) {
      my $c;
      do {

Discussion

  • Bram

    Bram - 2014-03-27

    otherwise, it could be nice to be able to send shell commands to stdin, ie:

    $ echo cd default-group | kpcli --kdb my.kdb
    

    This provides a work-around to the annoying keepass feature that entries cant be stored in /.

     
  • Lester Hightower

    • status: open --> closed-invalid
    • assigned_to: Lester Hightower
     

Log in to post a comment.

MongoDB Logo MongoDB