您好,我最近一直在使用python并正在阅读Blackhat Python,这使我创建了一个tcpproxy并在行上出现了管道破裂的错误
# Send it to our request handler
local_buffer = request_handler(local_buffer)
# Send off the data to the remote host
remote_socket.send(remote_buffer)
print "[==>] Sent %d bytes" %len(local_buffer)
# Receive back the response
remote_buffer = receive_from(remote_socket)
if len(remote_buffer):
print "[<== Received %d bytes from remote." % len(remote_buffer)
hexdump(remote_buffer)
# Send to our response handler
remote_buffer = response_handler(remote_buffer)
# Send the response to the local socket
client_socket.send(remote_buffer) # Here's where the
# Broken pipe starts