Update README

This commit is contained in:
Nikola Petrov
2023-08-30 00:48:21 +02:00
parent c3ab543baa
commit 1533722456
3 changed files with 27 additions and 22 deletions

View File

@@ -18,7 +18,7 @@ void print_args()
printf_s(" -h print this message\n");
printf_s(" <label> get password of this label can use GLOB\n");
printf_s(" -g <label> generate password of this label (or update if exists)\n");
printf_s(" -i <label> input password for this label (or update if exists)\n");
printf_s(" -i <label> input new password for this label (or update if exists)\n");
printf_s(" -d <label> delete password of this label\n");
printf_s(" -s <label> show password for this label\n");
printf_s(" -u <label> update username for this label\n");

View File

@@ -48,15 +48,7 @@ int main(int argc, char** argv)
if (save_location.empty() && args != Arg::File)
{
printf_s("No save location, try selecting file (-f)\n");
return 1;
}
printf_s("Input main password:");
user_pass = get_user_password();
if (user_pass.empty())
{
printf_s("Error getting password\n");
printf_s("No save location, try selecting folder (-f)\n");
return 1;
}
@@ -71,6 +63,17 @@ int main(int argc, char** argv)
return 1;
}
#if !DEBUG
printf_s("Input main password:");
user_pass = get_user_password();
if (user_pass.empty())
{
printf_s("Error getting password\n");
return 1;
}
#endif // !1
Cryptography crypto(user_pass.c_str(), user_pass.size());
Buffer decrypted_buffer;