How to fix broken pipe error in python networking

763 Views Asked by At

I am creating a remote command program (like a botnet). I am using socket to do this, and when I try to send the command to the client. It throws a errno 32 broken pipe. Heres the code for sending

print("Attempting to send command "+cmd)
            verify = input("Is this the correct command y/n: ")
            if verify == "y":
                s.send(str.encode(cmd))
            if verify == 'n':
                print("Please enter your command again!")
                os.system('clear')
                remoteCommand()
            Response = conn.recv(1024)

And here is the receiving end code:

while True:
    Cmd = s.recv(1024)
0

There are 0 best solutions below