[ACCEPTED]-python socket - how to save stream to file-sockets
By a simple client socket program?
import socket HOST = 'yourhost' # The remote host PORT = 101 # The same port as used by the server s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) data = s.recv(1024) s.close() with open('yourfile','w') as f: f.write(data)
Further 1 help here.
More Related questions