Implemented method to create passwordFile.
This commit is contained in:
parent
a75b7ca352
commit
e5b8ef71f8
12
src/server.c
12
src/server.c
@ -108,6 +108,18 @@ int main(void)
|
||||
send(connfd, &aux, sizeof(aux), 0);
|
||||
}
|
||||
}
|
||||
else if (req.type == 1)
|
||||
{
|
||||
char *filepath = create(char);
|
||||
filepath = size(filepath, 256);
|
||||
|
||||
strcpy(filepath, PASSWORDS);
|
||||
|
||||
sprintf(filepath, "%s%d.bin", filepath, req.level);
|
||||
|
||||
encryptText(req.key, req.key);
|
||||
writel(filepath, req.key, 256);
|
||||
}
|
||||
}
|
||||
|
||||
// Close the socket
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user