This commit is contained in:
Mia von Steinkirch 2020-03-02 18:23:52 -08:00
parent dac26e1abb
commit 90049c80af
15 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,11 @@
DATA = 'GET / HTTP/1.1\r\nHost: google.com\r\n\r\n'
def tcp_client():
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect((HOST, PORT))
client.send(DATA)
response = client.recv(4096)
print(response)
if __name__ == '__main__':
tcp_client()