Implemented method to create passwordFile.

This commit is contained in:
Afonso Clerigo Mendes de Sousa 2025-02-27 12:23:19 +00:00
parent a75b7ca352
commit e5b8ef71f8

View File

@ -108,6 +108,18 @@ int main(void)
send(connfd, &aux, sizeof(aux), 0); 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 // Close the socket