Skip to content

Instantly share code, notes, and snippets.

@yoku0825
Created June 9, 2025 05:11
Show Gist options
  • Save yoku0825/6d8a2fee64de1b687f7c41bd6052f69e to your computer and use it in GitHub Desktop.
Save yoku0825/6d8a2fee64de1b687f7c41bd6052f69e to your computer and use it in GitHub Desktop.
65c65
< static my_bool opt_verbose, opt_all, tty_password= 0, opt_warn,
---
> static my_bool opt_verbose, opt_all, opt_warn,
151c151
< 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
---
> &opt_password, &opt_password, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
248d247
< tty_password= 1;
543,545d541
< if (tty_password)
< opt_password= get_tty_password(NullS);
<
918,936d913
< const char *password_str= "\npassword = ", *mask = "*****";
< char *next= NULL;
<
< while ((next= strstr(buf, password_str)) != NULL)
< {
< while ( *buf != 0 && buf != next)
< putc( *(buf ++), stdout);
< printf("%s", password_str);
< printf("%s\n", mask);
< if (*buf == '\n') /* Move past \n' */
< buf ++;
<
< /* Ignore the password. */
< while( *buf && *(buf ++) != '\n')
< {}
<
< if ( !opt_all)
< break;
< }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment