0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

盛り盛り nc

0
Posted at

nc

TCP/UDPの調査とかに使うらしい

何に利用した?

tcpdumpの動作確認

普通の使い方は知らんし想像もできん

何が出来るの?

TCP/UDPのポートを指定して読み書きが出来る
もっと色々出来るが、どうせ忘れるので知らないでおく

操作ログ

1. ポートをlisten

$ nc -l 54321

2. リッスンの確認

$ lsof -i:54321

3. 接続

$ telnet 127.0.0.1 54321

4. 接続の確認

$ lsof -i:54321
COMMAND   PID   USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
nc      12415 qon    3u  IPv4 0x4fcf6657625b83a1      0t0  TCP *:54321 (LISTEN)
nc      12415 qon    4u  IPv4 0x4fcf665773bce079      0t0  TCP localhost:54321->localhost:50191 (ESTABLISHED)
telnet  12420 qon    3u  IPv4 0x4fcf6657756dde89      0t0  TCP localhost:50191->localhost:54321 (ESTABLISHED)

所感

どのサイトもスイスアーミーナイフに例えているけど、何それ使ったことない

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?