LoginSignup
2
2

More than 5 years have passed since last update.

(初心者)WireSharkとtsharkの導入

Posted at

netcatは便利だが、パケットの詳細を見ることができなかったのでWireSharkとtshark(CLI版wireshark)を導入した。
WireSharkは便利だが、値をエディタに貼り付けるのに不便だったので、そのときはtsharkといった具合に使い分けている。

インストール方法

これでWiareSharkとtsharkがインストールされる。

brew install wireshark

実行方法&結果

試しにSNMPパケットの送信

送信側
snmpwalk -c public -v 1 localhost
受信側
$ sudo nc -u -l localhost 161
0&public?c?8?0
              0 +0&public?c?8?0
                               0

上の挙動を横からパケットキャプチャ。

tshark
$ tshark -i lo0 -l host localhost and udp
Capturing on 'Loopback'
  1   0.000000    127.0.0.1 -> 127.0.0.1    SNMP 72 get-next-request 1.3.6.1.2.1
  2   1.001250    127.0.0.1 -> 127.0.0.1    SNMP 72 get-next-request 1.3.6.1.2.1
  3   2.006483    127.0.0.1 -> 127.0.0.1    SNMP 72 get-next-request 1.3.6.1.2.1

以上です。

2
2
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
2
2