mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-02-16 02:20:42 +00:00
Changed random Client ID to the same as official Moonlight
This commit is contained in:
@@ -87,11 +87,8 @@ static int load_unique_id(const char* keyDirectory) {
|
|||||||
|
|
||||||
FILE *fd = fopen(uniqueFilePath, "r");
|
FILE *fd = fopen(uniqueFilePath, "r");
|
||||||
if (fd == NULL) {
|
if (fd == NULL) {
|
||||||
unsigned char unique_data[UNIQUEID_BYTES];
|
snprintf(unique_id,UNIQUEID_CHARS+1,"0123456789ABCDEF");
|
||||||
RAND_bytes(unique_data, UNIQUEID_BYTES);
|
|
||||||
for (int i = 0; i < UNIQUEID_BYTES; i++) {
|
|
||||||
sprintf(unique_id + (i * 2), "%02x", unique_data[i]);
|
|
||||||
}
|
|
||||||
fd = fopen(uniqueFilePath, "w");
|
fd = fopen(uniqueFilePath, "w");
|
||||||
if (fd == NULL)
|
if (fd == NULL)
|
||||||
return GS_FAILED;
|
return GS_FAILED;
|
||||||
|
|||||||
Reference in New Issue
Block a user