From 35b97450fe688bb637cdce4e31edab41bcda698d Mon Sep 17 00:00:00 2001 From: bol-van Date: Tue, 25 Nov 2025 14:49:24 +0300 Subject: [PATCH] nfqws2: optimize mtproto detection --- nfq2/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nfq2/protocol.c b/nfq2/protocol.c index d9d314e..3477a48 100644 --- a/nfq2/protocol.c +++ b/nfq2/protocol.c @@ -1408,7 +1408,7 @@ bool IsMTProto(const uint8_t *data, size_t len) ctr_add(iv,3); if (!aes_setkey(&ctx, AES_ENCRYPT, data+8, 32) && !aes_cipher(&ctx, iv, decrypt)) { - *((uint64_t*)(decrypt+8)) ^= *((uint64_t*)(data+56)); + *((uint32_t*)(decrypt+8)) ^= *((uint32_t*)(data+56)); return !memcmp(decrypt+8,"\xEF\xEF\xEF\xEF",4); } }