tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Crazy idea: generate a pseudo-random value for tramp-end-of-output


From: Francis Litterio
Subject: Crazy idea: generate a pseudo-random value for tramp-end-of-output
Date: Thu, 10 Oct 2002 17:03:05 -0400
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386-msvc-nt5.0.2195)

Here's a crazy solution to the issue where the string "/////" cannot
appear in the output of a remote command:

(require 'time-stamp)
(defvar tramp-end-of-output
  ;; Hash up some unpredictable data...
  (md5 (concat (prin1-to-string process-environment)
               (time-stamp-yyyy-mm-dd)
               (time-stamp-hh:mm:ss)
               (prin1-to-string (directory-files-and-attributes (getenv 
"HOME")))))
  "String used to recognize end of output.")

Now, every Emacs session gets a cryptographically secure random value
for tramp-end-of-output.  The liklihood of it appearing in the output of
a remote command is very small.

I've tested it, and it works.  I'm not submitting a patch, because it's
kinda crazy.  Comments?
--
Francis Litterio
address@hidden
http://world.std.com/~franl/
GPG and PGP public keys available on keyservers.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]