2013年5月29日水曜日

tcpdumpしてWiresharkで確認しようと思ったらエラーがでて困ったんす。

サーバー上でtcpdumpして、FTPでダンプファイルを落としてwiresharkで見ようとしたら
<code>sudo tcpdump host hoge.com and port 80 -s 0 -w dumpfile</code>

The capture file appears to be damaged or corrupt.
(pcap: File has 1702194273-byte packet, bigger than maximum of 65535

とかいうエラーがでて見れませんでした。
グーグル先生に聞いたら
wireshark Q&A
The usual cause of this error is the file being mangled by transferring it over FTP in ASCII mode instead of BINARY mode. If you did transfer the file by FTP, please transfer the file again, now using BINARY mode.
と仰られていたので、バイナリモードで落としてみたら見れました。
Filezillaの場合は転送→転送の種類で変更できます。(デフォルトは自動)

それって気にしたことなかったけど重要だったんですね!

0 件のコメント: