I have a basic netcat listener on my network that uses this command: nc -l 1234 | bash. This command runs everything it receives in nc into BASh. It works, however, only the listener can see the outputs. How can I make the client able to see the output?

  • 2
    This might be better handled by socat or similar via socat TCP-LISTEN:1234 EXEC:"bash -i",pty,stderr,setsid,sigint,sane,echo=0 and then using nc as a client to connect to that listener. – thrig Oct 26 '17 at 15:50
  • What's socat? I want this remote shell to use only things that come installed on the system. – anonymous Oct 26 '17 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.