Add prompt for the password when reading from stdin

This commit is contained in:
Shea Levy 2011-09-08 01:35:46 -04:00
parent f03b2e227a
commit 6b8ac9ef18

View File

@ -729,6 +729,7 @@ int main(int argc, char* argv[])
return 1; return 1;
if (strcmp("-", instance->settings->password) == 0) if (strcmp("-", instance->settings->password) == 0)
{ {
printf("Password: ");
fgets(instance->settings->password, 512-1, stdin); fgets(instance->settings->password, 512-1, stdin);
*(instance->settings->password + strlen(instance->settings->password) - 1) = '\0'; *(instance->settings->password + strlen(instance->settings->password) - 1) = '\0';
} }