如何在perl中打开tcpdump文件并进行一些模式匹配? [英] how to open a tcpdump file in perl and do some pattern matching ?

查看:122
本文介绍了如何在perl中打开tcpdump文件并进行一些模式匹配?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个tcpdump文件(例如abc.cap),只能使用ethereal或tcpdump打开.
我想打开该文件并使用perl进行一些模式匹配.
我能对如何在perl脚本中使用tcpdump打开文件进行解释吗?

i have one tcpdump file (say abc.cap) , which can only be opened using ethereal or tcpdump.
i want to open that file and do some pattern matching using perl.
can i have some idea how to open that file using tcpdump in perl script???

推荐答案

此处为tcpdump文件格式的描述:http://www.tcpdump.org/pcap/pcap.html [
Here''s a description of the tcpdump file format: http://www.tcpdump.org/pcap/pcap.html[^].

That''s all you should need to read that file and interpret it.

Cheers!


这对我有用! :-D

tcpdump -qns 0 -X -r serverfault_request.pcap
tcpdump -qns 0 -A -r blah.pcap
this worked for me ! :-D

tcpdump -qns 0 -X -r serverfault_request.pcap
tcpdump -qns 0 -A -r blah.pcap


这篇关于如何在perl中打开tcpdump文件并进行一些模式匹配?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆