看到大侠使用ngrep-sip工具(其实质还是用ngrep工具),现总结下使用。
1.到网上下载ngrep-sip,提供一个下载地址如下
压缩包里面有两个文件,ngrep-sip.conf,ngrep-sip
2.下载后,解压,把其中的ngrep-sip.conf放入/etc/下(当然这个文件存放目录也是可以自定义的,编辑ngrep-sip,修改conf_file即可)。
3.修改
ngrep-sip.conf把interface改为实际要抓包的网口。
4.修改ngrep-sip文件,可以把文件最后的命令
ngrep -d $interface -P "" -W byline -T -i -t "$match" $filter
改为
tmp=$(date -d today +%Y%m%d%H%M%S)
ngrep -d $interface -O /tmp/capture_"$tmp".pcap "$match" $filter
如此一来,就可以保存抓包到
/tmp目录下