[erlang-questions] Hiding user input in escript

Jeremy Ong jeremy@REDACTED
Wed Mar 20 00:14:14 CET 2013


As a workaround, is it possible to do this in os:cmd using stty -echo?


On Tue, Mar 19, 2013 at 4:11 PM, Bob Ippolito <bob@REDACTED> wrote:

> You can probably get around it by not using escript and just booting up a
> compiled beam that does what you want... "erl -noinput -noshell -s
> user_drv" seems to start a shell that can handle io:get_password(), so you
> could poke inside user_drv and see how to start up user_drv and your script
> without the shell.
>
>
> On Tue, Mar 19, 2013 at 4:08 PM, Bryan Hughes <bryan@REDACTED>wrote:
>
>>  Hi Bob,
>>
>> Thanks for checking it out!  Guess not too many people are writing
>> scripts that need to deal with passwords.  I will go ahead and submit it as
>> a bug.
>>
>> Cheers,
>> Bryan
>>
>>
>> On 3/19/13 4:01 PM, Bob Ippolito wrote:
>>
>> R16B does not change anything for escript as far as I can tell.
>>
>> On Tue, Mar 19, 2013 at 3:17 PM, Bob Ippolito <bob@REDACTED> wrote:
>>
>>> I see io:get_password() in my io module in R15B03, but it doesn't appear
>>> to work with escript because it uses the old 'user' rather than 'group'
>>> which doesn't understand the get_password io request. Haven't looked at
>>> R16B yet.
>>>
>>>
>>>
>>>  On Tue, Mar 19, 2013 at 2:04 PM, Bryan Hughes <bryan@REDACTED>wrote:
>>>
>>>>   Hi Everyone,
>>>>
>>>> I found this old thread from 2009 about trying to hide user input in an
>>>> escript (e.g. entering a password).
>>>>
>>>> http://erlang.org/pipermail/erlang-questions/2009-April/043311.html
>>>>
>>>> It concluded with:
>>>>
>>>> The problem seems to be that escript uses the old shell, which
>>>> does not support any way to control the terminal.
>>>>
>>>> We'll have a look at escript for the next release and see whether
>>>> it would be possible to have it run with the standard shell.
>>>>
>>>>
>>>> Does anyone know if this has been fixed.  I looked through the docs and
>>>> do not find io:get_password/0, or any options for reading stdin to not echo
>>>> the characters back.
>>>>
>>>> Looking forward to meeting those of you attending Erlang Factory in a
>>>> couple of days.
>>>>
>>>> Cheers,
>>>> B
>>>>
>>>> --
>>>>
>>>> Bryan Hughes
>>>> *Go Factory*
>>>> http://www.go-factory.net
>>>>
>>>> *"Art is never finished, only abandoned. - Leonardo da Vinci"*
>>>>
>>>>
>>>>
>>>>  _______________________________________________
>>>> erlang-questions mailing list
>>>> erlang-questions@REDACTED
>>>> http://erlang.org/mailman/listinfo/erlang-questions
>>>>
>>>>
>>>
>>
>> --
>>
>> Bryan Hughes
>> CTO and Founder / *Go Factory*
>> (415) 515-7916
>>
>> http://www.go-factory.net
>>
>> *"Art is never finished, only abandoned. - Leonardo da Vinci"*
>>
>>
>>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130319/ce265205/attachment.htm>


More information about the erlang-questions mailing list