Skip to main content
Clarification.
Source Link
Yimin Rong
  • 953
  • 2
  • 9
  • 23

I'd like to take a program P that reads from stdinstdin & writes to stdout andstdout, but connect it to ncnc or whatever such that it reads from a certain port and outputs to another port.

# The reading is easy, here P reads from port 50505
nc -l 50505 | P

How do I get it to write back to say port 60606?

I'd like to take a program P that reads from stdin & writes to stdout and connect it to nc such that it reads from a certain port and outputs to another port.

# The reading is easy, here P reads from port 50505
nc -l 50505 | P

How do I get it to write back to say port 60606?

I'd like to take a program P that reads from stdin & writes to stdout, but connect it to nc or whatever such that it reads from a certain port and outputs to another port.

# The reading is easy, here P reads from port 50505
nc -l 50505 | P

How do I get it to write back to say port 60606?

Source Link
Yimin Rong
  • 953
  • 2
  • 9
  • 23

Redirect stdin and stdout to ports

I'd like to take a program P that reads from stdin & writes to stdout and connect it to nc such that it reads from a certain port and outputs to another port.

# The reading is easy, here P reads from port 50505
nc -l 50505 | P

How do I get it to write back to say port 60606?