On 1/3/17, Tony Whyman wrote:
> Today, I also came up against the problem of how to read a password from
> the console without echo. With a bit of googling and code bashing, I
> have created the following cross-platform code from a "getpassword"
> function.
>
>repeat
> read(c);
>
On 27/11/16 17:07, Michael Van Canneyt wrote:
If you mean in a cross-platform way, I think we would welcome patches :)
Michael.
Today, I also came up against the problem of how to read a password from
the console without echo. With a bit of googling and code bashing, I
have created the follo
On Sun, 27 Nov 2016, Adriaan van Os wrote:
I wonder what the recommended way is to readln a password from console, as a
standard Readln echoes the password.
Readln is wholly unsuited to the task. You're better off writing a
routine that gets input one character at a time.
g.
--
Proud owne
On 27/11/16 18:54, James Richters wrote:
Shouldn't an extremely basic function like readkey be cross-platform?
It is, but the crt unit only works with (almost) fully functional
terminal windows, and not with redirected or piped input/output (as used
by Xcode).
Jonas
__
users discussions
Subject: Re: [fpc-pascal] Readln a password
On Sun, 27 Nov 2016, Adriaan van Os wrote:
>> Dmitry Boyarintsev wrote:
>>
>>> I'd think you want something simlar on unix.
>>> Take a look at man 4 termios
>>> specifically at local flag named &qu
On Sun, 27 Nov 2016, Adriaan van Os wrote:
Dmitry Boyarintsev wrote:
I'd think you want something simlar on unix.
Take a look at man 4 termios
specifically at local flag named "ECHO".
you want to disable it via tcsetattr() Â (TermIO unit)
Thanks for the hint. I haven't yet tried it, but I
Dmitry Boyarintsev wrote:
I'd think you want something simlar on unix.
Take a look at man 4 termios
specifically at local flag named "ECHO".
you want to disable it via tcsetattr() Â (TermIO unit)
Thanks for the hint. I haven't yet tried it, but I would expect it to fail,as stty (see stty.c in
Tomas Hajny wrote:
Does the same limitation / issue apply for
Keyboard.GetKeyEvent/PollKeyEvent on Mac OS X?
To a lesser extent. It doesn't write "funny characters" to the Xcode Console window as "uses CRT"
does, but still echoes typed characters. Like with "uses CRT", the problem doesn't occu
Dmitry Boyarintsev wrote:
I'd think you want something simlar on unix.
Take a look at man 4 termios
specifically at local flag named "ECHO".
you want to disable it via tcsetattr() Â (TermIO unit)
Thanks for the hint. I haven't yet tried it, but I would expect it to fail, as stty (see stty.c in
On Sun, November 27, 2016 15:49, Adriaan van Os wrote:
> James Richters wrote:
>> Here is how I read passwords... it generates a random character and
>> displays
>> that so someone looking over your shoulder things those characters are
>> the
>> password
>> It uses readkey which does not display on
On Sun, Nov 27, 2016 at 8:24 AM, Adriaan van Os wrote:
> I wonder what the recommended way is to readln a password from console, as
> a standard Readln echoes the password.
>
> 1. SetConsoleMode seems to be Windows-specific
>
I'd think you want something simlar on unix.
Take a look at man 4 term
James Richters wrote:
Here is how I read passwords... it generates a random character and displays
that so someone looking over your shoulder things those characters are the
password
It uses readkey which does not display on the screen, one character at a
time
Thanks for your reply, but please
I would like to mention that if you store your password in a constant like
this:
const
password='mypassword'
then if someone edits your exe file with any text editor, your password will
be in there as text and easy to find.
I have used this method to get around this... I store a huge string
Here is how I read passwords... it generates a random character and displays
that so someone looking over your shoulder things those characters are the
password
It uses readkey which does not display on the screen, one character at a
time
Function Readpw:String;
Var
Pwstring : String;
pwchar
14 matches
Mail list logo