@@ -168,7 +168,6 @@ public class Signer : AndroidBotSignProvider, IDisposable
168168 private readonly ILogger < Signer > _logger ;
169169
170170 private readonly string _base ;
171- private readonly string _version ;
172171 private readonly string ? _token ;
173172 private readonly HttpClient _client ;
174173
@@ -181,7 +180,6 @@ public Signer(ILogger<Signer> logger, IOptions<CoreConfiguration> options)
181180
182181 var signerConfiguration = options . Value . Signer ;
183182 _base = signerConfiguration . Base ?? throw new Exception ( "Core.Signer.Base cannot be null" ) ;
184- _version = signerConfiguration . Version ?? throw new Exception ( "Core.Signer.Version connot be null" ) ;
185183 _token = signerConfiguration . Token ;
186184 _client = new HttpClient ( new HttpClientHandler
187185 {
@@ -230,7 +228,7 @@ public override bool IsWhiteListCommand(string cmd)
230228 private async Task < SsoSecureInfo > GetPcSecSign ( string cmd , int seq , ReadOnlyMemory < byte > body )
231229 {
232230 var response = await GetSign < PcSecSignRequest , PcSecSignResponse > (
233- $ " { _base } / { _version } " ,
231+ _base ,
234232 new PcSecSignRequest ( cmd , seq , Convert . ToHexString ( body . Span ) )
235233 ) ;
236234
@@ -252,7 +250,8 @@ private async Task<SsoSecureInfo> GetAndroidSecSign(long uin, string cmd, int se
252250 seq ,
253251 Convert . ToHexString ( body . Span ) ,
254252 Convert . ToHexString ( Context . Keystore . Guid ) ,
255- Context . AppInfo . PtVersion
253+ Context . AppInfo . PtVersion ,
254+ "V1_AND_SQ_9.2.20_11650_YYB_D"
256255 )
257256 ) ;
258257
@@ -275,7 +274,8 @@ public override async Task<byte[]> GetEnergy(long uin, string data)
275274 data ,
276275 Convert . ToHexString ( Context . Keystore . Guid ) ,
277276 Context . AppInfo . SdkInfo . SdkVersion ,
278- Context . AppInfo . PtVersion
277+ Context . AppInfo . PtVersion ,
278+ "V1_AND_SQ_9.2.20_11650_YYB_D"
279279 )
280280 ) ;
281281
@@ -298,7 +298,8 @@ public override async Task<byte[]> GetDebugXwid(long uin, string data)
298298 uin ,
299299 data ,
300300 Convert . ToHexString ( Context . Keystore . Guid ) ,
301- Context . AppInfo . PtVersion
301+ Context . AppInfo . PtVersion ,
302+ "V1_AND_SQ_9.2.20_11650_YYB_D"
302303 )
303304 ) ;
304305
@@ -340,17 +341,17 @@ public async Task<BotAppInfo> GetAppInfo()
340341
341342 using var request = new HttpRequestMessage ( ) ;
342343 request . Method = HttpMethod . Get ;
343- request . RequestUri = new Uri ( $ "{ _base } /{ _version } / appinfo_v2") ;
344+ request . RequestUri = new Uri ( $ "{ _base } /appinfo_v2") ;
344345 if ( ! string . IsNullOrWhiteSpace ( _token ) ) request . Headers . Add ( "X-API-Key" , _token ) ;
345346
346347 using var response = await _client . SendAsync ( request ) ;
347348 if ( ! response . IsSuccessStatusCode ) throw new Exception ( $ "Unexpected http status code({ response . StatusCode } )") ;
348349
349- var result = JsonUtility . Deserialize < BotAppInfo > ( await response . Content . ReadAsStreamAsync ( ) ) ;
350+ var result = JsonUtility . Deserialize < AndroidSignerResponse < BotAppInfo > > ( await response . Content . ReadAsStreamAsync ( ) ) ;
350351 if ( result == null ) throw new NullReferenceException ( "Result is null" ) ;
351352
352- _info = result ;
353- return result ;
353+ _info = result . Data ;
354+ return result . Data ;
354355 }
355356 finally
356357 {
@@ -400,7 +401,7 @@ public class PcSecSignResponseValue(string sign, string token, string extra)
400401 public string Extra { get ; init ; } = extra ;
401402}
402403
403- public class AndroidSecSignRequest ( long uin , string cmd , int seq , string buffer , string guid , string version )
404+ public class AndroidSecSignRequest ( long uin , string cmd , int seq , string buffer , string guid , string version , string qua )
404405{
405406 [ JsonPropertyName ( "uin" ) ]
406407 public long Uin { get ; } = uin ;
@@ -419,9 +420,12 @@ public class AndroidSecSignRequest(long uin, string cmd, int seq, string buffer,
419420
420421 [ JsonPropertyName ( "version" ) ]
421422 public string Version { get ; } = version ;
423+
424+ [ JsonPropertyName ( "qua" ) ]
425+ public string Qua { get ; } = qua ;
422426}
423427
424- public class AndroidEnergyRequest ( long uin , string data , string guid , string ver , string version )
428+ public class AndroidEnergyRequest ( long uin , string data , string guid , string ver , string version , string qua )
425429{
426430 [ JsonPropertyName ( "uin" ) ]
427431 public long Uin { get ; } = uin ;
@@ -437,9 +441,12 @@ public class AndroidEnergyRequest(long uin, string data, string guid, string ver
437441
438442 [ JsonPropertyName ( "version" ) ]
439443 public string Version { get ; } = version ;
444+
445+ [ JsonPropertyName ( "qua" ) ]
446+ public string Qua { get ; } = qua ;
440447}
441448
442- public class AndroidDebugXwidRequest ( long uin , string data , string guid , string version )
449+ public class AndroidDebugXwidRequest ( long uin , string data , string guid , string version , string qua )
443450{
444451 [ JsonPropertyName ( "uin" ) ]
445452 public long Uin { get ; } = uin ;
@@ -452,6 +459,9 @@ public class AndroidDebugXwidRequest(long uin, string data, string guid, string
452459
453460 [ JsonPropertyName ( "version" ) ]
454461 public string Version { get ; } = version ;
462+
463+ [ JsonPropertyName ( "qua" ) ]
464+ public string Qua { get ; } = qua ;
455465}
456466
457467public class AndroidSignerResponse < TData > ( TData data )
0 commit comments