1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

Add stdin-supplied password support

This commit is contained in:
LouisTakePILLz
2015-08-12 17:25:47 -04:00
parent ba9af46662
commit 9582d8fbcb
3 changed files with 27 additions and 4 deletions

View File

@@ -889,11 +889,19 @@ namespace VeraCrypt
{
CommandLineInterface &cmdLine = *CmdLine;
switch (cmdLine.ArgCommand)
{
case CommandId::None:
if (cmdLine.ArgCommand == CommandId::None)
return false;
if (Preferences.UseStandardInput)
{
wstring pwdInput;
wcin >> pwdInput;
cmdLine.ArgPassword = make_shared<VolumePassword> (pwdInput);
}
switch (cmdLine.ArgCommand)
{
case CommandId::AutoMountDevices:
case CommandId::AutoMountFavorites:
case CommandId::AutoMountDevicesFavorites: