logo       

Re: Password processing in Lisp: msg#00943

emacs.help

Subject: Re: Password processing in Lisp

tennis_smith@xxxxxxxxx (Tennis Smith) writes:

> Hi. I'm trying to write a lisp function that will
> automatically telnet and login to a router. Unfortunately,
> when I get to password processing, it expects me to type in
> the minibuffer. How can I get around that programatically
> and send the password from my defun?

I assume you are using the telnet.el file. If that is the case you
should check this
;; You can use the global telnet-host-properties to associate a telnet
;; program and login name with each host you regularly telnet to.


setting it may work. But I guess the problem is this line:
(let ((password (comint-read-noecho "Password: " t)))
(setq telnet-count 0)
(process-send-string proc (concat password telnet-new-line))))

in function telnet-initial-filter.

If that is the case you must change this lines for your needs.

I would use the telnet-host-properties for it and extend it.



Regards
Friedrich


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise