lua-users home
lua-l archive

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


Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
>
> io.write("password: ")
> io.flush()
> os.execute("stty -echo")
> password=io.read()
> os.execute("stty sane")
> if (hash(password)==hashed_password) then ...

Best to use "stty echo" rather than "stty sane" to avoid trampling other
tty settings.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Irish Sea: Southwesterly 4 or 5, but variable 3 at times in north. Slight or
moderate. Occasional rain, fog patches. Good, occasionally poor, occasionally
very poor.