Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Update api salt
Browse files Browse the repository at this point in the history
  • Loading branch information
Azure99 committed Mar 5, 2021
1 parent bbdedf4 commit 9150c12
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Core/GenshinAPI.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Security.Cryptography;
Expand Down Expand Up @@ -84,7 +85,7 @@ private static ServerResponse<T> Request<T>(Func<WebClient, string> func)
{
client.Encoding = Encoding.UTF8;
client.Headers["x-rpc-client_type"] = "5";
client.Headers["x-rpc-app_version"] = "2.3.0";
client.Headers["x-rpc-app_version"] = "2.4.0";
client.Headers["DS"] = CreateDynamicSecret();
client.Headers["Cookie"] = MessageBus.LoginTicket;

Expand All @@ -106,7 +107,7 @@ private static string CreateDynamicSecret()
{
long time = (long) (DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
string random = CreateRandomString(6);
string check = ComputeMd5($"salt=h8w582wxwgqvahcdkpvdhbh2w9casgfl&t={time}&r={random}");
string check = ComputeMd5($"salt=pbcfcvnfsm5s2w4x3lsq8caor7v8nlqm&t={time}&r={random}");

return $"{time},{random},{check}";
}
Expand Down

0 comments on commit 9150c12

Please sign in to comment.