root 启动软件wireshark:$ sudo wireshark 即可
Mac下安装Wireshark
/Applications/Wireshark.app/Contents/MacOS/Wireshark
root# export DISPLAY=:0.0
The domain/default pair of (kCFPreferencesAnyApplication, AppleAquaColorVariant) does not exist
2013-10-28 23:04:03.650 defaults[4205:507]
The domain/default pair of (kCFPreferencesAnyApplication, AppleHighlightColor) does not exist
(process:4187): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
(wireshark-bin:4187): Gtk-WARNING **: cannot open display:
root# export DISPLAY=:0.0
root# xhost +
root# xhost +localhost
root# xhost + localhost
root# hostname
shuiyouren.local
root# xhost + shuiyouren.local
root# export XAUTHORITY=/Users/[shuiyouren(你的用户主目录)]/.Xauthority
启动X11程序,然后以root账户运行Wireshark:
root# /Applications/Wireshark.app/Contents/MacOS/Wireshark
Wireshark设置interface 时提示“There are no interfaces on which a capture can be done ”
然后在抓到的网络请求选中后右键,导出即可。