1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
import time
import ssl
import sabctools
import socket
import time
hostname = "eunews.frugalusenet.com"
context = ssl.create_default_context()
print(sabctools.openssl_linked)
buffer = bytearray(100)
bufferview = memoryview(buffer)
with socket.create_connection((hostname, 563)) as sock:
with context.wrap_socket(sock, server_hostname=hostname) as ssock:
ssock.setblocking(False)
time.sleep(1)
print(ssock.version())
print(sabctools.unlocked_ssl_recv_into(ssock._sslobj, bufferview[99:]))
print(buffer)
|