nc(netcat)을 이용하여 socket 동작 확인 방법

TechNote Forum Forums Forum nc(netcat)을 이용하여 socket 동작 확인 방법

Tagged: , , ,

This topic contains 1 reply, has 2 voices, and was last updated by  cefm**** 9 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #259


    nc — arbitrary TCP and UDP connections and listens

    The nc (or netcat) utility is used for just about anything under the sun involving TCP, UDP,
    or UNIX-domain sockets. It can open TCP connections, send UDP packets, listen on arbitrary
    TCP and UDP ports, do port scanning, and deal with both IPv4 and IPv6. Unlike telnet(1), nc
    scripts nicely, and separates error messages onto standard error instead of sending them to
    standard output, as telnet(1) does with some.

    udp socket 을 구현하여 그 동작을 확인하기 위한 목적으로 nc를 사용하였다.

    ~$ nc 6667 -u

    위와 같이 실행하여 입력하면 바로 sendto 가 가능하고 거기에 대한 recvfrom로 즉각 확인이 가능하다.

    • This topic was modified 1 year, 3 months ago by  technote.
    • This topic was modified 10 months, 1 week ago by  technote.



    위와 같이  client로 nc를 쓸수 도 있지만 server로 사용도 가능합니다.


    nc -vl PORT

    -l 은 listen

    -v 는 vervose

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.