mirror of
https://github.com/alexbers/mtprotoproxy.git
synced 2026-03-14 07:13:09 +00:00
add one more message about the client time skew
This commit is contained in:
@@ -884,6 +884,7 @@ async def handle_fake_tls_handshake(handshake, reader, writer, peer):
|
|||||||
timestamp = int.from_bytes(xored_digest[-4:], "little")
|
timestamp = int.from_bytes(xored_digest[-4:], "little")
|
||||||
if not is_time_skewed and abs(time.time() - timestamp) > TIME_SKEW_TOLERANCE:
|
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("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
|
continue
|
||||||
|
|
||||||
http_data = bytearray([random.randrange(0, 256) for i in range(fake_cert_len)])
|
http_data = bytearray([random.randrange(0, 256) for i in range(fake_cert_len)])
|
||||||
|
|||||||
Reference in New Issue
Block a user