Immutable Page History Attachments


Page name: rupi / GpgPasswordGrep

Gpg Password Grep

  • This is a small perl hack, nothing fancy..


  • [get | view] (2013-11-02 13:55:55, 2.1 KB) [[attachment:pwgrep]]
  • [get | view] (2013-11-02 14:01:10, 0.5 KB) [[]]
 All files | Selected Files: delete move to page


example / usage

  • password files are located in $HOME/.p/
  • this is hardcoded (it's a small script.. easy to change)
  • assume: a hostgroup called 'foo' with 2 machines: 'alpha' and 'donkey'
  • sample password file $HOME/.p/foo.gpg

  • alpha root ptZPXbQrRI3kWesiJGZwzmx
    alpha mysql root o4Sl3DuCRfmVzx7ywcGlI2k
    alpha mysql app n956i87PPmAaBWBlEPD6TI7
    donkey root IODtmQ9QEnDUAyqkRMJVwPn
    donkey user UZQ7IWXUXnU5Ib5wcAFpB0r
  • password exctraction:
  • $  pwgrep foo alpha mysql
    ## gpg password stuff ommited - nice if you use gpg-agent or similar stuff (with timeouts of course..)
    several results found:
     0: alpha mysql root
     1: alpha mysql app
    select a result: 0
    selected alpha mysql root
  • now the mysql root password of machine alpha is selected

TagHack CategoryProjects