admin管理员组

文章数量:1531764

2024年5月5日发(作者:)

TShark (Wireshark) 3.0.2 (v3.0.2-0-g621ed351d5c9)

Usage: tshark [options] ...

Capture interface(捕获接口选项):

-i name or idx of interface (def: first non-loopback) 设置捕获接口,默认为第一个

非本地循环接口。

-f packet filter in libpcap filter syntax 设置抓包过滤表达式,表达式的写法同于

tcpdump,如在分析本地文件时则无用处。

-s packet snapshot length (def: appropriate maximum) 设置每个抓包的大小,默认

为65535,多于这个大小的数据将不会被程序记入内存、写入文件。

-p don't capture in promiscuous mode 设置网络接口以非混合模式工作,即只关心和本机有关的

流量。

-I capture in monitor mode, if available

-B size of kernel buffer (def: 2MB) 设置缓冲功能区大小,仅对Windows系统有效,

默认2M

-y link layer type (def: first appropriate) 设置抓包的数据链路层协议,不设置则默认

为-L找到的第一个协议,局域网一般是EN10MB(Ethernet)等。

-D print list of interfaces and exit 列出当前存在的网络接口。在不了解OS所控制的网络设备时,

一般先用“tshark -D”查看网络接口的编号以供-i参数使用。

-L print list of link-layer types of iface and exit 列出本机支持的数据链路层协议,供-y参数使用。

Capture stop conditions(捕获停止选项):

-c stop after n packets (def: infinite) 捕获n个数据包后结束,默认捕获无限个。

-a duration:NUM - stop after NUM seconds 在NUM秒之后停止捕获

filesize:NUM - stop this file after NUM KB 在NUM KB之后切换到下一个文件

files:NUM - stop after NUM files 形成环形缓冲,在写入NUM个文件之后

Capture output(捕获输出选项):

-b duration:NUM - switch to next file after NUM secs 在NUM秒之后切换

到下一文件

interval:NUM - create time intervals of NUM secs

filesize:NUM - switch to next file after NUM KB 在NUM KB之后切换到下一

个文件

files:NUM - ringbuffer: replace after NUM files 形成环形缓冲,在写入NUM

个文件之后

RPCAP options(远程抓包协议进行抓包remote packet capture protocol选项):

-A : use RPCAP password authentication 使用RPCAP密码进行认证

本文标签: 设置捕获网络接口协议文件