17 lines
338 B
Python
17 lines
338 B
Python
import socket
|
|
|
|
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
client.connect(("vyatsu.ru", 80))
|
|
|
|
request = (
|
|
"GET / HTTP/1.1\r\n"
|
|
"Host: vyatsu.ru\r\n"
|
|
"Connection: close\r\n"
|
|
"\r\n"
|
|
)
|
|
|
|
client.sendall(request.encode("utf-8"))
|
|
response = client.recv(4096)
|
|
print(response.decode(errors="ignore"))
|
|
|
|
client.close() |