Redirect process stdin and stdout to netcat

前端 未结 3 2239
清酒与你
清酒与你 2021-02-10 09:43

I have an embedded linux application with a simple interactive command line interface.

I\'d like to access the command line from telnet (or network, in general).

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-10 10:02

    You can use ncat (from nmap package: apt install nmap) for that as well as follow:

    ncat -lnvp 443 -e myapp

    don't forget to fflush(stdout); after each printf("%s",str); in your app

提交回复
热议问题