gPass

gPass Commit Details

Date:2017-05-06 18:13:36 (2 years 1 month ago)
Author:Grégory Soutadé
Branch:master
Commit:35f49d24b32cdbc9b24661373eca3f4580cf3192
Parents: 09e0d85d976a3aefb9c65a6150e9a736040ef72b
Message:CLI: Clear displayed password after 30 seconds (if found)

Changes:
Mcli/main.c (3 diffs)

File differences

cli/main.c
4040
4141
4242
43
4344
4445
4546
......
7172
7273
7374
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
7494
7595
7696
......
434454
435455
436456
437
457
438458
439459
440460
#define SERVER_PROTOCOL 4
#define RESPONSE_SIZE 2048
#define MAX_SUBDOMAINS 10
#define DISPLAY_TIME 30 // 30 seconds
struct gpass_parameters {
unsigned pbkdf2_level;
static EVP_CIPHER_CTX * s_cipher_ctx;
static void display_password(char* password, int time)
{
int length;
for (; time; time--)
{
printf("\r(%02d) Password found: %s", time, password);
fflush(stdout);
sleep(1);
}
// Clear line
printf("\r");
length = 4 + 17 + strlen(password) + 1;
while (length--)
printf(" ");
printf("\n");
}
static int digest(unsigned char** out, unsigned char* in, unsigned size)
{
*out = NULL;
memmove(password, &password[3], len-3);
password[len-3] = 0;
}
printf("Password found: %s\n", password);
display_password((char*)password, DISPLAY_TIME);
ret = 0;
goto end;
}

Archive Download the corresponding diff file