Menu

#7 Popup input?

v1.0_(example)
closed
nobody
None
5
2017-09-05
2017-09-05
mikeB
No

Love this software - is fast and does a good job. BUT am looking for it to pop up asking for password to encr/decrpt. In other words are using it in a GUI (via shell) and need it to pop up to get the input instead of requiring user to enter in the terminal.. Is this possible?

Discussion

  • Peter Selinger

    Peter Selinger - 2017-09-05

    Ccrypt itself does not do this, because it is a command line tool. However, you can easily write a script that prompts the user for the password via a GUI and then invokes ccrypt. For example, the attached is a simple Tcl/TK script (adapted from http://wiki.tcl.tk/3131) that prompts for a password and then echos the password to its standard output. You could pipe the password directly into ccrypt like this:

    wish getpass.tk | ccrypt -k- myfile

    This would encrypt the file "myfile" with the password provided by the user. (In reality, for encryption, you should probably modify getpass.tk to ask the user for the password twice, and only send the password if the user entered it correctly. For decryption, it doesn't have to be entered twice).

    I've only used Tcl/TK because it is very succinct. You have to install 'wish' to use it. But of course any other scripting language with GUI capabilities could do the same.

    I hope this helps, -- Peter

     

    Last edit: Peter Selinger 2017-09-05
    • mikeB

      mikeB - 2017-09-06

      Okay - I'll give that a try and thanks so much for your fast reply.

      have a GREAT day,

      mikeB

      code-it.com

      On 09/05/2017 04:42 PM, Peter Selinger wrote:

      Ccrypt itself does not do this, because it is a command line tool.
      However, you can easily write a script that prompts the user for the
      password via a GUI and then invokes ccrypt. For example, the attached
      is a simple Tcl/TK script (adapted from http://wiki.tcl.tk/3131) that
      prompts for a password and then echos the password to its standard
      output. You could pipe the password directly into ccrypt like this:

      wish getpass.tk | ccrypt -k- myfile

      This would encrypt the file "myfile" with the password provided by the
      user. (In reality, you should probably modify getpass.tk to ask the
      user for the password twice, and only send the password if the user
      entered it correctly).

      I've only used Tcl/TK because it is very succinct. You have to install
      'wish' to use it. But of course any other scripting language with GUI
      capabilities could do the same.

      I hope this helps, -- Peter

      Attachments:


      [support-requests:#7]
      https://sourceforge.net/p/ccrypt/support-requests/7/ Popup input?

      Status: open
      Group: v1.0_(example)
      Created: Tue Sep 05, 2017 09:35 PM UTC by mikeB
      Last Updated: Tue Sep 05, 2017 09:35 PM UTC
      Owner: nobody

      Love this software - is fast and does a good job. BUT am looking for
      it to pop up asking for password to encr/decrpt. In other words are
      using it in a GUI (via shell) and need it to pop up to get the input
      instead of requiring user to enter in the terminal.. Is this possible?


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/ccrypt/support-requests/7/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Peter Selinger

    Peter Selinger - 2017-09-05
    • status: open --> closed
     

Log in to post a comment.