Added some privacy when showing all passowords.

This commit is contained in:
Afonso Clerigo Mendes de Sousa 2025-02-28 20:14:44 +00:00
parent 4c16c8b953
commit 022c2fb956
3 changed files with 8 additions and 2 deletions

BIN
KeyMaster

Binary file not shown.

Binary file not shown.

View File

@ -70,7 +70,7 @@ int main(void)
return 0; return 0;
} }
} }
printf("KeyMaster\nVersion: 0.2\n\n"); printf("KeyMaster\nVersion: 0.3\n\n");
try try
{ {
@ -202,7 +202,13 @@ int main(void)
recv(sockfd, &req1, sizeof(req1), 0); recv(sockfd, &req1, sizeof(req1), 0);
if (req1.level != -1 && strlen(req1.key) > 0) if (req1.level != -1 && strlen(req1.key) > 0)
{ {
printf("Level: %d\tKey: %s\n", req1.level, req1.key); char hidden_key[256];
strncpy(hidden_key, req1.key, 6);
for (size_t i = 6; i < strlen(req1.key); i++)
{
hidden_key[i] = '.';
}
printf("Level: %d\tKey: %s\n", req1.level, hidden_key);
} }
} }
} }