HomeAboutCodePastes

Paste on 2021-01-23T00:11:27

(define pass
  (if (null? (command-line-arguments))
      (begin
        (display "Password: ")
        (list->string
         (let loop ((c (with-stty '(not echo) read-char)))
           (if (char=? c #\newline)
               (begin
                 (newline)
                 '())
               (begin
                 (display #\*)
                 (flush-output )
                 (cons c
                       (loop (read-char))))))))
      (car (command-line-arguments))))

plain