做成脚本了,保存成文件,sudo ./xxx.sh即可。
#!/bin/bash # 如果没有加sudo,提示错误并退出 if [ "x$(id -u)" != x0 ]; then echo "Error: please run this script with 'sudo'." exit 1 fi #安装依赖的源码和工具 sudo apt-get -yf install libssl-dev libpcap-dev git-core autoconf automake libtool bison flex gnome-core-devel libgnutls-dev #下载和解压wireshark源码 wget http://www.wireshark.org/download/src/all-versions/wireshark-1.7.1.tar.bz2 tar jxvf wireshark-1.7.1.tar.bz2 #下载spdyshark扩展包代码 git clone https://code.google.com/p/spdyshark/ cp -r spdyshark/spdyshark wireshark-1.7.1/plugins/ #patch cd wireshark-1.7.1 patch -p1 < ../spdyshark/spdyshark_build.patch ./autogen.sh #配置 ./configure --with-ssl #解决编译时treat warning as error的问题 sed -i /'AM_CFLAGS = -Werror'/d wsutil/Makefile sed -i /'AM_CFLAGS = -Werror'/d epan/ftypes/Makefile #解决链接时找不到g_module_name函数的问题。这是wireshark源码的bug,官方是如下的解决方案 sed -i '370a @GLIB_LIBS@ \\' Makefile.am #编译 make #安装。如想打包成deb,此处应为sudo checkinstall sudo make install
export LD_LIBRARY_PATH=/usr/local/lib
或者先
sudo ldconfig
要得到root权限才能截包:
sudo wireshark
带有spdy支持的wireshark,在Preferences的Protocols下会有SPDY选项。
注:本文的方法在Ubuntu13、Linux Mint 15下测试通过。使用方法见下一篇文章。《使用支持SPDY协议的Wireshark截包(含spdyshark插件)》
参考:
http://blog.csdn.net/hursing/article/details/20543837
以上方法能在32bit和64bit系统都适用。64bit的deb包下载:http://download.csdn.net/detail/hursing/7000107
转载请注明出处:http://blog.csdn.net/hursing