Chaosreader 0.89 の使い方
2004-01-01 作成 福島
TOP > tips > chaosreader
chasreader の Web ページ http://users.tpg.com.au/bdgcvb/chaosreader.html

$ wget http://users.tpg.com.au/bdgcvb/chaosreader
$ chmod +x chaosreader
$ ./chaosreader --help | grep 'Version'       バージョン番号の確認
Version 0.89, 16-Nov-2003

・予めダンプファイルを作成してから実行する $ su tcpdump を使うため root になる # tcpdump -i eth1 -c 100 -w out1 とりあえず 100 パケットキャプチャしてファイル (out1) に格納する # exit もう tcpdump は使わないので root から抜ける $ mkdir ./sample $ chaosreader -D ./sample out1 $ cat out1 | chaosreader -D ./sample こちらでも可
以下のファイルが作成されます (短時間キャプチャなので、例として相応しくないかも)
./sample/index.html
./sample/index.text
./sample/getpost.html
./sample/httplog.text
./sample/image.html

chaosreader 0.89 では -S オプション (スタンドアローンモード) が使えますが、 インターフェース (eth0 等) を指定するオプションが無いため不便です。 「どうしても」という向きには、3615 行目辺りに、
$command = "tcpdump -s9999 -w";
という行があるので、これを
$command = "tcpdump -i eth1 -s9999 -w";
等と変更すれば使えます。 使い方は、 $ su 内部で tcpdump を呼び出すので root になる # chaosreader -D ./sample -S 2,10 2 分毎に 10 回集計する です。 以下のファイルがリアルタイム ("-S 2" なので 2 分毎) に更新されます。
index.file
index.html
index.text
また、ヒストリとして
out_20040001-1758/
のようなディレクトリが自動的に出来るので、インターバルは短いほうが良いでしょう。 このディレクトリには、以下のようなファイルが (それぞれ) 入ります。
getpost.html
httplog.text
image.html
index.html
index.text
out_20040001-1758.log
session_0015.http.html
session_0018.part_01.smtp.email
session_0018.smtp.html
session_0020.smtp.html
stream_0002.domain.html
...
stream_0027.domain.html