WiresharkをMacにインストールする。

ネットワークのパケットをキャプチャするアプリ、WiresharkMacにインストールする。

Wiresharkのサイト
http://www.wireshark.org/

ダウンロード

下記の場所から、Mac版をダウンロードする。
http://www.wireshark.org/download.html

ダウンロードしたファイルはこれ
Wireshark 1.2.9 Intel.dmg

ディスクイメージの内容

インストール

インストール方法は、Read me first.rtfに書いてあります。

	1.	Drag the Wireshark icon onto to the Applications alias.
	2.	Open the Utilities folder.
	3.	Drag the contents of the Command Line folder to $HOME/bin, /usr/local/bin, /opt/wireshark/bin or any other location that makes sense (preferably one that's in your PATH).
	4.	You will probably need to adjust the permissions of /dev/bpf* in order to capture. You can do this by hand or by dragging the ChmodBPF folder onto the StartupItems alias.
アプリケーションをインストール

Wireshark.appをApplicationsフォルダのエイリアスにドラッグする。



Utilitiesフォルダの中のファイルをインストール


Command Lineフォルダの中のコマンドをパスが通っているフォルダにコピーする。

/usr/local/bin
に下記のファイルをコピーした。

capinfos
dftest
dumpcap
editcap
idl2wrs
mergecap
randpkt
rawshark
text2pcap
tshark
wireshark
ChmodBPFをコピー

ChmodBPFフォルダをディスクイメージの中の、StartupItemsエイリアスにドラッグしてコピーする。


※これだとダメだったので、↓やり直してます。

Macを再起動

Macを再起動するとエラーメッセージが表示されてしまう。


/Library/StartupItemsのChmodBPFの権限を確認すると下記のようになっている。

drwxr-xr-x@  5 kuru  wheel   170  6  9 08:48 ChmodBPF

ChmodBPFは削除してしまって

$ sudo mkdir /Library/StartupItems/ChmodBPF
$ sudo cp /Volumes/Wireshark/Utilities/ChmodBPF/ChmodBPF /Library/StartupItems/ChmodBPF
$ sudo cp /Volumes/Wireshark/Utilities/ChmodBPF/StartupParameters.plist /Library/StartupItems/ChmodBPF


もう一度、再起動するとエラーメッセージは表示されなくなった。



Wireshark.appを起動




これで使えるようになった。