Ubuntu 工具 socat

reference:

[https://snoopysecurity.github.io/network-security/2018/03/21/introduction_to_socat.html]

create loopback tty

sudo socat pty,link=/dev/ttyAP0 pty,link=/dev/ttyAP0

create tcp server

socat TCP-LISTEN:5000 -

create TLS server

socat TCP-LISTEN:51000,fork,reuseaddr OPENSSL:remotehost:51000,cafile=certificate.pem,verify=0

create telnet server

socat exec:'bash -li',pty,stderr,setsid  tcp-listen:5000,reuseaddr

create tty

socat -d -d tcp-l:1233,reuseaddr,fork file:/dev/ttyUSB0,nonblock,raw,echo=0,waitlock=/var/run/tty,min=0,b115200

  轉載請註明: YuYan's blog Ubuntu 工具 socat

  目錄