From bcef107c25b9b89908c2fa0aa3937300efc57461 Mon Sep 17 00:00:00 2001 From: klockky Date: Thu, 2 Jul 2026 16:06:48 +0000 Subject: [PATCH] =?UTF-8?q?=D0=B0=D0=BB=D0=BE=20=D0=BA=D0=B0=D0=BA=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BD=D0=B0=D1=85=D1=83=D0=B9=20mode=20=D1=8D=D1=82?= =?UTF-8?q?=D0=BE=20=D1=88=D1=82=D0=BE=20=D1=82=D0=B0=D0=BA=D0=BE=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/backend/modules/account.dart | 6 ++++++ lib/core/protocol/chat_cache_fingerprint.dart | 8 ++++---- lib/core/storage/spoofing_service.dart | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/backend/modules/account.dart b/lib/backend/modules/account.dart index 692f5e6..533750c 100644 --- a/lib/backend/modules/account.dart +++ b/lib/backend/modules/account.dart @@ -1454,6 +1454,12 @@ class AccountModule { 'language': language, }; + final callsSeed = _api.callsSeed; + final deviceId = _api.deviceId; + if (callsSeed != null && deviceId != null) { + payload['mode'] = ChatCacheFingerprint.compute(callsSeed, deviceId); + } + logger.i('Запрос OTP-кода: phone=${_maskPhone(normalizedPhone)} type=${type.value}'); final packet = await _api.sendRequest(Opcode.authRequest, payload); diff --git a/lib/core/protocol/chat_cache_fingerprint.dart b/lib/core/protocol/chat_cache_fingerprint.dart index 15261e5..2387a07 100644 --- a/lib/core/protocol/chat_cache_fingerprint.dart +++ b/lib/core/protocol/chat_cache_fingerprint.dart @@ -5,13 +5,13 @@ import 'package:crypto/crypto.dart'; class ChatCacheFingerprint { static final Uint8List _signatureDigest = _hex( - '2917772b58095daca2a99a099f85ee0214c9a9d72bea2007cbaf5b45f29c8d18', + '1684414033eb263e2c615f8b7df5ed8793850a07656304997fbf07e9e21e1e93', ); static final Uint8List _soDigest = _hex( - 'ec3f447f41e161b0dec7ce6d5ce9d52428895da54e0d9d036d93913b45c7a3c1', + '90e2fb8745b17b42a10182f8d8ac590e3fca5b311e2ce2d5144fa2c18cb3090d', ); static final Uint8List _dexDigest = _hex( - 'd590910db09464e19553e22c184c135ace8c6cb6d4407920f949d561724fb8fe', + '0a6265f6e5d8231b9cba641f8c40475e6f3baeb06ed41b804b9bf7307aa4214e', ); static Uint8List compute(int callsSeed, String deviceId) { @@ -19,8 +19,8 @@ class ChatCacheFingerprint { final device = Uint8List.fromList(utf8.encode(deviceId)); final result = BytesBuilder(); result.add(_sha256(_signatureDigest, seed, device)); - result.add(_sha256(_soDigest, seed, device)); result.add(_sha256(_dexDigest, seed, device)); + result.add(_sha256(_soDigest, seed, device)); return result.toBytes(); } diff --git a/lib/core/storage/spoofing_service.dart b/lib/core/storage/spoofing_service.dart index f0eee5a..0fb6451 100644 --- a/lib/core/storage/spoofing_service.dart +++ b/lib/core/storage/spoofing_service.dart @@ -8,8 +8,8 @@ import '../../models/spoof_profile.dart'; import 'token_storage.dart'; class SpoofingService { - static const String hardcodedAppVersion = '26.19.2'; - static const int hardcodedBuildNumber = 6732; + static const String hardcodedAppVersion = '26.20.2'; + static const int hardcodedBuildNumber = 6758; static const String pendingScope = 'pending'; static const String _legacyEnabledKey = 'spoofing_enabled';