Skip to content

Instantly share code, notes, and snippets.

@fyx99
Created April 13, 2023 14:41
Show Gist options
  • Save fyx99/bc66edc590398d73f73a6725846514fe to your computer and use it in GitHub Desktop.
Save fyx99/bc66edc590398d73f73a6725846514fe to your computer and use it in GitHub Desktop.
Python TCP Client
import socket
host = "localhost"
port = 4444
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect((host,port))
client.send(b"")
response = client.recv(4096)
print(response)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment