摘要:
#!/usr/bin/env python# Filename: post.pyimport sysdef send(host,port,request): import socket s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.connect((host,port)) s.sendall("GET / HTTP/1.1\r\nContent-Length:%d\r\n\r\n%s\r\n"%(len(request),request)) while 1: ... 阅读全文