![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hide Password | whatisthis | Shell Programming and Scripting | 4 | 07-21-2008 09:59 AM |
| How Do I Hide the Password in a Script | samd | Shell Programming and Scripting | 6 | 11-22-2006 05:38 AM |
| Want to hide password | arpitk | Shell Programming and Scripting | 1 | 09-29-2006 09:42 AM |
| Hide oracle password on unix process list | acheepi | Shell Programming and Scripting | 3 | 10-06-2005 10:25 PM |
| How to hide password on Linux? | nir_s | Shell Programming and Scripting | 2 | 02-09-2005 12:24 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I am doing a project in C program which requires to type in password in Unix terminal. Does anybody know how to shade or not output any words typed by user in the terminal?
I use the function scan() to read typing from user. Thanks in advance. |
|
||||
|
sorry Driver, i really can't figure out the solution for my question with the code below that you posted. Would you please explain more with a simple code to do that? Thanks. Code:
#include <termios.h>
#include <stdio.h>
int
getch(void) {
struct termios old;
struct termios new;
int rc;
if (tcgetattr(0, &old) == -1) {
return -1;
}
new = old;
new.c_lflag &= ~(ICANON | ECHO);
new.c_cc[VMIN] = 1;
new.c_cc[VTIME] = 0;
if (tcsetattr(0, TCSANOW, &new) == -1) {
return -1;
}
rc = getchar();
(void) tcsetattr(0, TCSANOW, &old);
return rc;
}
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|