GithubHelp home page GithubHelp logo

cli-pinentry's Introduction

goal

the simple goal here is to be able to invoke pinentry(1) (a part of GNU Privacy Guard) from the command line, passing some of the most likely options as command line flags. the retrieved secret can be returned as output (to stdout) or copied to the system clipboard.

i did this, really, because i don’t particularly like the UI of ssh-askpass(1) (sorry if the link is broken).

SECURITY PROBLEMS!!!!

pinentry(1) works hard to keep the secret (pin) secure, trying, e.g., to not allow pin to end up on the disk (by keeping it in unpagable memory). cli-pinentry, sadly, doesn’t do all this, and MAY ALLOW A PIN that would otherwise be kept safe to be LEAKED.

possibly, cli-pinentry is as secure as ssh-askpass.

your mileage may vary, and the author of this program makes NO WARRANTIES about the safety and/or security of the program. do NOT use this program for “vital” secrets.

prerequisites

in addition to some “standard” python packages (os, sys, termios), cli-pinentry requires the following python packages:

these can be installed by, e.g., pip(1) or “apt-get install”, depending on your setup.

the pyperclip package itself requires either xclip(1) (preferred) or xsel(1).

synopsis

cli-pinentry[-h,–help]# print help message
[{-c,–copy}]# don’t print result, rather copy to clipboard
[–desc descriptivetext]# pinentry’s “SETDESC” command
[–prompt prompt]# pinentry’s “SETPROMPT” command
[–ok text]# pinentry’s “SETOK” command
[–cancel text]# /pinentry’s “SETCANCEL” command
[–pinentry “pinentry”]# which program to use (e.g., “pinentry-curses”)

examples

to get help:

cli-pinentry -h

to run, using pinentry-curses:

cli-pinentry --pinentry pinentry-curses

cli-pinentry tries to disallow the output being printed on the terminal. but, if you really need to see what you typed in, you can always pipe the output of cli-pinentry through cat(1):

cli-pinentry | cat

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.