From 7502d1dc311df6c61f6ae0b1707e17b246712dd3 Mon Sep 17 00:00:00 2001 From: Alexander Bersenev Date: Fri, 16 Aug 2019 18:11:50 +0500 Subject: [PATCH] add one more message about the client time skew --- mtprotoproxy.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mtprotoproxy.py b/mtprotoproxy.py index 0cc59dd..6640f2e 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -884,6 +884,7 @@ async def handle_fake_tls_handshake(handshake, reader, writer, peer): timestamp = int.from_bytes(xored_digest[-4:], "little") if not is_time_skewed and abs(time.time() - timestamp) > TIME_SKEW_TOLERANCE: print_err("Client with time skew detected from %s, can be a replay-attack" % peer[0]) + print_err("The clocks were %d minutes behind" % ((time.time() - timestamp) // 60)) continue http_data = bytearray([random.randrange(0, 256) for i in range(fake_cert_len)])