简单用法,可以分析soap数据包。
this is probably the easiest way to monitor SOAP messages.
simply use
#tcpdump -i eth0 -A -s 1024 port 80 | tee dump.log
to log all the packet sent to port 80 to dump.log
***********************************************************
今天在尝试TTserver的Http协议接口,为了确定走的协议是否为Http,需要抓包确定一下,
在windows下有很多工具很方便的抓包,linux下只能通过命令行来操作了,下面简单记录一下
tcpdump工具的使用:
//抓包,
tcpdump -nX -s 0 -w cap.raw host 123.123.123.123 and port 2978
//读包
tcpdump -r cap.raw -A
tcpdump有很多参数选项,man就可看到,
-----------------------------------------------------------------------------------
EXAMPLES
To print all packets arriving at or departing from sundown:
tcpdump host sundown
To print traffic between helios and either hot or ace:
tcpdump host helios and \( hot or ace \)
To print all IP packets between ace and any host except helios:
tcpdump ip host ace and not helios
To print all traffic between local hosts and hosts at Berkeley:
tcpdump net ucb-ether
To print all ftp traffic through internet gateway snup: (note that the
expression is quoted to prevent the shell from (mis-)interpreting the
parentheses):
tcpdump 'gateway snup and (port ftp or ftp-data)'
To print traffic neither sourced from nor destined for local hosts (if
you gateway to one other net, this stuff should never make it onto your
local net).
tcpdump ip and not net localnet
To print the start and end packets (the SYN and FIN packets) of each
TCP conversation that involves a non-local host.
tcpdump 'tcp[tcpflags] & (tcp-syn|tcp-fin) != 0 and not src and dst net localnet'
To print all IPv4 HTTP packets to and from port 80, i.e. print only
packets that contain data, not, for example, SYN and FIN packets and
ACK-only packets. (IPv6 is left as an exercise for the reader.)
tcpdump 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<>2)) != 0)'
To print IP packets longer than 576 bytes sent through gateway snup:
tcpdump 'gateway snup and ip[2:2] > 576'
To print IP broadcast or multicast packets that were not sent via Eth-
ernet broadcast or multicast:
tcpdump 'ether[0] & 1 = 0 and ip[16] >= 224'
To print all ICMP packets that are not echo requests/replies (i.e., not
ping packets):
tcpdump 'icmp[icmptype] != icmp-echo and icmp[icmptype] != icmp-echoreply'
------------------------------------------------------------------------------------
注:需要root的权限才能运行tcpdump命令
说实话,tcpdump虽然强大,但是毕竟操作起来不如windows下一些图形软件方便。
分享到:
相关推荐
Linux下抓包工具tcpdump使用介绍.docx
Linux下抓包工具tcpdump应用详解
linux 嵌入式抓包工具tcpdump,配套源码,只需更改编译链重新编译即可方便使用
linux/unix抓包工具tcpdump
arm下抓包工具 Linux version 4.14
抓包选项: -c:指定要抓取的包数量。注意,是最终要获取这么多个包。例如,指定"-c 10"将获取10个包,但可能已经处理了100个包,只不过只有10个包是满足条件的包。 -i interface:指定tcpdump需要监听的接口。若未...
linux平台对网络上传输的数据包进行捕获的抓包工具: tcpdump-4.5.1-2.el7.x86_64.rpm 网络数据包捕获函数库: libpcap-1.5.3-12.el7.x86_64.rpm
Tcpdump 4.5.1版本,解压后是一个二进制可执行文件,不需要任何编译和安装,可以直接执行,上传Linux环境解压即可使用: root@admin:/tmp# ./tcpdump -help tcpdump version 4.5.1 libpcap version 1.5.3 Usage: ...
Tcpdump主要是截获通过本机网络接口的数据,用以分析。Nmap是强大的端口扫描工具,可扫描任何主机或网络。Netstat可用来检查本机当前提供的服务及状态。这三者各有所长,结合起来,就可以比较透彻地了解网络状况。
支持在Tomato DualWAN 等系统下使用的tcpdump工具. chmod +x tcpdump 简单用法: a. 抓取所有与192.168.1.3通讯的数据包,并且显示在命令行下 /tmp/tcpdump -i br0 -f "host 192.168.1.3" -vv b. 抓取所有与192....
安装tcpdump的抓包工具 ./configure make make install 设置软链接 ln -sf /usr/local/bin/m4 /usr/bin/m4 ln -sf /usr/local/bin/flex /usr/bin/flex ln -sf /usr/local/bin/flex++ /usr/bin/flex++ ln -sf /...
Linux系统抓包工具,可直接运行,传上来方便大家使用.
Linux运维-运维课程网络基础d3- 路由表与抓包工具使用16tcpdump工具抓包【了解】.mp4
linux版,对tcpdump进行在开发,抓到的包不用分析包的工具分析,直接的文本文件,很方便,只从有的这个工具我不用tcpdump了,太麻烦了,把程序放到linux目录, 增加执行权限就可以使用了 如放到/home目录 # cp /home...
适用于ARMv5 Linux的tcpdump。。 那个著名的抓包程序~ 静态编译~
tcpdump是Linux下面的一个开源的抓包工具,和Windows下面的wireshark抓包工具一样, 支持抓取指定网口、指定目的地址、指定源地址、指定端口、指定协议的数据。 1、安装tcpdump yum install -y tcpdump 2、常见的...
适用于centos6版本的抓包工具 ,免安装,解压后直接在sbin目录下即可执行,网络数据采集分析工具
linux下抓包封信工具Tcpdump详解,ping详解,Tcpdump命令的使用与示例——linux下的网络分析
用简单的话来定义tcpdump,就是:dump the traffic on a network,根据使用者的定义对网络上的数据包进行截获的包分析工具。 tcpdump可以将网络中传送的数据包的“头”完全截获下来提供分析。它支持针对网络层、协议...
tcpdump抓包工具,比较详细,Linux系统的命令可以使用。