diff options
-rw-r--r-- | rtty.1 | 5 | ||||
-rw-r--r-- | rtty.c | 13 |
2 files changed, 9 insertions, 9 deletions
@@ -30,8 +30,9 @@ If the .Sy +d flag is provided, .Nm -tries to detect password prompts from the remote server -and hide the user's input. +disables all heuristics to detect password prompts +from the remote server and hide the user's input, +which are enabled by default. If the .Sy +p flag is provided, @@ -22,7 +22,7 @@ main(int argc, char *argv[]) char bufin[MAXBUF], bufout[MAXBUF], *bi, *bo, in[30], **nargv, out[30], pw[255]; fd_set rfds0, rfds1; - int detect, fdin, fdout, i, n, offset, sshpass; + int dumb, fdin, fdout, i, n, offset, sshpass; struct timeval tv; signal(SIGCHLD, sigchld); @@ -35,9 +35,9 @@ main(int argc, char *argv[]) err(1, "mkfifo"); /* Process rtty-specific flags. */ - detect = sshpass = 0; + dumb = sshpass = 0; for(;argv[1][0] == '+';){ - if(strchr(argv[1], 'd')) detect = 1; + if(strchr(argv[1], 'd')) dumb = 1; if(strchr(argv[1], 'p')) sshpass = 1; /* Remove flag argument from argv. */ @@ -153,13 +153,12 @@ main(int argc, char *argv[]) fflush(stdout); bufin[0] = 0; - if(!detect) - continue; - /* - * As the +d flag is given, rtty tries to detect + * Unless the +d flag is given, rtty tries to detect * password prompts and hide the user's input. */ + if(dumb) + continue; if(bo[strlen(bo)-1] == ':' || strcmp(bo+strlen(bo)-2, ": ") == 0){ if(!(bo = strrchr(bufout, '\n'))) |