1

I am using this command

socat -lm -d -d TCP4-LISTEN:5555,reuseaddr,fork EXEC:/bin/myscript,chroot=/root/,su=root,pty,stderr

to start a server but when i send the i connect to it through netcat and send some input, it sends back input+output . Why is that ? I don't want my input back .

Terminal 1:

socat -lm -d -d TCP4-LISTEN:5555,reuseaddr,fork EXEC:/bin/myscript,chroot=/root/,su=root,pty,stderr

Terminal 2:

root@vm:echo "AAAAAA" | nc localhost 5555
AAAAAA[i don't want this to be coming back to me]
output(AAAAAA)

user2001987
  • 113
  • 4

1 Answers1

2

The input being echoed back to the client is a result of using the pty option.

If there is no requirement for having pty the easiest solution would be to simply drop that from the command line.

Håkan Lindqvist
  • 35,011
  • 5
  • 69
  • 94