Added some privacy when showing all passowords.
This commit is contained in:
parent
4c16c8b953
commit
022c2fb956
BIN
bin/KeyMaster
BIN
bin/KeyMaster
Binary file not shown.
10
src/main.c
10
src/main.c
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user