TCL/TK - Port to pgp 
Author Message
 TCL/TK - Port to pgp

I want to use pgp out of a tcl-script, but if i do it the
  exec pgp +batchmode -z $passphrase $file

i get all the interactive messages as an Error.
(I'm working on my own pc, so i dont care the security problem..)

I tried
  exec pgp ... >& /dev/null

but the result is an "Child exited abnormally" all the time.

Because of that I tried running it as an parallel process
  exec pgp ... &

But i have to wait till the process terminates to continue execution.

-> Q: How can I wait for the termination of a child
          (do i _have_ to use tclX ?)
      Is there another way for handling pgp ?      
          (I know the expect-package, but i want to keep it plain tcl).

--
------------------------------------------------------------------


------------------------------------------------------------------



Thu, 26 Feb 1998 03:00:00 GMT  
 TCL/TK - Port to pgp
As mail has failed... here is what I attempted to send via e-mail.



-----BEGIN PGP SIGNED MESSAGE-----

: I want to use pgp out of a tcl-script, but if i do it the
:   exec pgp +batchmode -z $passphrase $file

For quite a while I was working on developing a "Tcl interface to pgp".
The only problem was "password generation" as that required interacting
with the keyboard directly in a "passthru mode". The only solution I was
able to come up with was to open a telnet session to the same host
(actually an rlogin) and that was really unacceptable.

For general interaction with pgp I used:

set retval [exec "pgp command"]

then a puts $retval to display the output to the user.

In a complex "series" of commands, I used the /tmp area to create a
shell file, and executed the shell file capturing stdout in the retval
and then post processing that to a display value and deleting the /tmp file.

jmi
*****



(310) 596 3753                URL:      http://www.crl.com/~ivler/jmi.html
WWW-based Solutions; Servers - CGI - HTML, Tcl/Tk, Training and Development
      Key fingerprint =  BB AE BF 61 48 CE 1F 72  F5 C2 92 FE 85 02 A1 44
*****
"It's Time." "Why Not." - _The Wild Bunch_

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBMFQ4sfHiX8oS90WFAQEu1gP/ZAWvxvtXFS/r7yfxn5D7nbQIGgsYdG4f
2aJtRZ+sLR75qzkOwYcxvdAjjK7+hi3ihjQnJhrOB8E+OM+c0k0seGfkMfd2jfeT
kNFiOCsLUlffPmCs3IHco6pVMKniyNOZX9jMux6SpaZhb5GR/sMl18Q4x6A64VQn
sDLQCgZ4moo=
=UkSB
-----END PGP SIGNATURE-----



Fri, 27 Feb 1998 03:00:00 GMT  
 TCL/TK - Port to pgp
: Did you look at the PGPPASSFD feature of more recent PGP's?  That's how exmh
: (a mail reader program written in Tcl/Tk) gives the password to pgp.

Ken,

The problem wasn't passing a password in, but generation of a new
password/passphrase. PGP uses the keystrokes and the timing between the
keystrokes to generate a psudo-random seed. That was where I was having a
"problem", and what finally caused me to abandon the effort (too much
time on a piece of "free" software).

jmi



Sat, 28 Feb 1998 03:00:00 GMT  
 TCL/TK - Port to pgp

Quote:

>As mail has failed... here is what I attempted to send via e-mail.




>-----BEGIN PGP SIGNED MESSAGE-----


>: I want to use pgp out of a tcl-script, but if i do it the
>:   exec pgp +batchmode -z $passphrase $file

>For quite a while I was working on developing a "Tcl interface to pgp".
>The only problem was "password generation" as that required interacting
>with the keyboard directly in a "passthru mode". The only solution I was
>able to come up with was to open a telnet session to the same host
>(actually an rlogin) and that was really unacceptable.

Did you look at the PGPPASSFD feature of more recent PGP's?  That's how exmh
(a mail reader program written in Tcl/Tk) gives the password to pgp.

--Ken



Sat, 28 Feb 1998 03:00:00 GMT  
 TCL/TK - Port to pgp
: I want to use pgp out of a tcl-script, but if i do it the
:   exec pgp +batchmode -z $passphrase $file
:
: i get all the interactive messages as an Error.
: (I'm working on my own pc, so i dont care the security problem..)
:
: I tried
:   exec pgp ... >& /dev/null
:
: but the result is an "Child exited abnormally" all the time.
:
: Because of that I tried running it as an parallel process
:   exec pgp ... &
:
: But i have to wait till the process terminates to continue execution.
:
: -> Q: How can I wait for the termination of a child
:         (do i _have_ to use tclX ?)
:       Is there another way for handling pgp ?      
:         (I know the expect-package, but i want to keep it plain tcl).
:
: --
: ------------------------------------------------------------------


: ------------------------------------------------------------------

Use Expect or Expectk  then you can grab the output of pgp and respond
accordingly.



Sat, 28 Feb 1998 03:00:00 GMT  
 TCL/TK - Port to pgp

           ^^^^^^^^^^^^^^
    YOU NEED TO FIX YOUR RETURN ADDRESS.

Quote:
>I want to use pgp out of a tcl-script, but if i do it the
>  exec pgp +batchmode -z $passphrase $file

>i get all the interactive messages as an Error.
>(I'm working on my own pc, so i dont care the security problem..)

>I tried
>  exec pgp ... >& /dev/null

>but the result is an "Child exited abnormally" all the time.

try: exec sh -c "pgp ... >/dev/null 2>&1;exit 0"
I've not tried it, but the exit status of the list should be the value of the
last element of the list so it should all work hunky-dory.

Jimmy



Sat, 28 Feb 1998 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. tcl/tk as a front end for PGP ?

2. PGP 5.0 and TCL/TK

3. tcl/tk PGP interface

4. Clarion calling PGP 6.5 or PGP 8.0

5. PGP related tcl extensions?

6. Tcl/tk and external port communication

7. Call for new maintainer of Tcl/Tk Cygwin port

8. Tcl/Tk 8.4.0 Cygwin port (very preliminary)

9. TIP #108: Summary of Changes to Generic Tcl/Tk Code to Enable Mac OS X Port

10. Palm OS port of TCL/TK

11. Tcl/Tk 8.1.1 cannot handle COM ports higher than 9 in Windows

12. vms port for tcl/tk?

 

 
Powered by phpBB® Forum Software