Last active
September 6, 2022 12:31
-
-
Save andreif/02e0778e7a6d9775f8e175ba16feb309 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| 0000 | 00 00 00 00 00 00 00 00 4A 96 70 27 C4 7A E5 51 | |
| 0010 | 14 00 00 00 78 97 46 60 3E 05 49 82 8C CA 27 E9 | |
| 0020 | 66 B3 01 A4 8F EC E2 FC | |
| """ | |
| import re | |
| msg = re.sub('\d{4} \| ', '', __doc__) | |
| msg = re.sub('\s+', '', msg) | |
| msg = bytes.fromhex(msg) | |
| import struct | |
| import zlib | |
| counter = 0 | |
| msg = struct.pack('<ii', len(msg) + 12, counter) + msg | |
| msg += struct.pack('<I', zlib.crc32(msg)) | |
| import socket | |
| s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| s.connect(('149.154.167.40', 443)) | |
| s.send(msg) | |
| print(s.recv(1024)) | |
| s.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment