tshark的命令使用

root:/# tshark -r tester_192.168.1.99_port2\(10\).pcap -T fields -e tcp.stream | uniq | wc -l
Running as user "root" and group "root". This could be dangerous.
9398
root:/# 
root:/# 
root:/# tshark -r tester_192.168.1.99_port2\(10\).pcap   -z "follow,tcp,hex,0" -q
Running as user "root" and group "root". This could be dangerous.

===================================================================
Follow: tcp,hex
Filter: tcp.stream eq 0
Node 0: 18.1.2.2:10000
Node 1: 18.1.1.100:80
00000000  50 4f 53 54 20 2f 61 61  61 2e 74 78 74 20 48 54  POST /aa a.txt HT
00000010  54 50 2f 31 2e 31 0d 0a  48 6f 73 74 3a 20 31 38  TP/1.1.. Host: 18
00000020  2e 31 2e 31 2e 31 30 30  0d 0a 43 6f 6e 74 65 6e  .1.1.100 ..Conten
00000030  74 2d 4c 65 6e 67 74 68  3a 20 31 32 0d 0a 43 6f  t-Length : 12..Co
00000040  6e 6e 65 63 74 69 6f 6e  3a 20 6b 65 65 70 2d 61  nnection : keep-a
00000050  6c 69 76 65 0d 0a 55 73  65 72 2d 41 67 65 6e 74  live..Us er-Agent
00000060  3a 20 46 69 72 65 66 6f  78 2f 34 31 2e 30 0d 0a  : Firefo x/41.0..
00000070  0d 0a 62 6f 31 70 36 79  32 54 5f 76 69 70        ..bo1p6y 2T_vip
        00000000  48 54 54 50 2f 31 2e 31  20 32 30 30 20 4f 4b 0d  HTTP/1.1  200 OK.
        00000010  0a 43 6f 6e 74 65 6e 74  2d 4c 65 6e 67 74 68 3a  .Content -Length:
        00000020  20 31 35 36 0d 0a 53 65  72 76 65 72 3a 20 6e 67   156..Se rver: ng
        00000030  69 6e 78 2f 31 2e 39 2e  35 0d 0a 43 6f 6e 74 65  inx/1.9. 5..Conte
        00000040  6e 74 2d 54 79 70 65 3a  20 74 65 78 74 2f 68 74  nt-Type:  text/ht
        00000050  6d 6c 0d 0a 0d 0a 3c 21  44 4f 43 54 59 50 45 20  ml....<! DOCTYPE
        00000060  68 74 6d 6c 3e 3c 68 74  6d 6c 3e 3c 68 65 61 64  html><ht ml><head
        00000070  3e 3c 6d 65 74 61 20 68  74 74 70 2d 65 71 75 69  ><meta h ttp-equi
        00000080  76 3d 22 43 6f 6e 74 65  6e 74 2d 54 79 70 65 22  v="Conte nt-Type"
        00000090  20 63 6f 6e 74 65 6e 74  3d 22 74 65 78 74 2f 68   content ="text/h
        000000A0  74 6d 6c 3b 63 68 61 72  73 65 74 3d 75 74 66 2d  tml;char set=utf-
        000000B0  38 22 3e 3c 74 69 74 6c  65 3e 20 53 75 70 65 72  8"><titl e> Super
        000000C0  6e 6f 76 61 20 3c 2f 74  69 74 6c 65 3e 3c 2f 68  nova </t itle></h
        000000D0  65 61 64 3e 3c 62 6f 64  79 3e 48 65 6c 6c 6f 57  ead><bod y>HelloW
        000000E0  6f 72 6c 64 3c 2f 62 6f  64 79 3e 3c 2f 68 74 6d  orld</bo dy></htm
        000000F0  6c 3e                                             l>
===================================================================
root:/# 
root:/# tshark -r tester_192.168.1.99_port2\(10\).pcap   -Y "tcp.stream eq 0"
Running as user "root" and group "root". This could be dangerous.
  604   2.011809     18.1.2.218.1.1.100   TCP 62 1000080 [SYN] Seq=0 Win=65535 Len=0 MSS=1452 SACK_PERM=1
  860   2.012895   18.1.1.10018.1.2.2     TCP 62 8010000 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=1452 SACK_PERM=1
 1115   2.013573     18.1.2.218.1.1.100   HTTP 180 POST /aaa.txt HTTP/1.1 
 1371   2.049709   18.1.1.10018.1.2.2     HTTP 296 HTTP/1.1 200 OK  (text/html)
 1626   2.050398     18.1.2.218.1.1.100   TCP 60 1000080 [RST, ACK] Seq=127 Ack=243 Win=65535 Len=0
root:/# 

 

posted @ 2021-11-20 11:16  撒欢  阅读(299)  评论(0编辑  收藏  举报