Linux环境下使用tcpdump抓包与下载

(1)报文抓取

tcpdump -i eno5 host 10.8.12.154 -w /test.cap

-i:抓取的网卡

host:目的地址

-w:生成的文件存放路径

Ctrl+c 结束抓包,抓取的报文存放在/的test.cap下

(2)报文获取

方法1:使用scp命令,将当前设备上/root下的set_fxs_port.cap文件传输到IP为10.8.12.90设备/mnt/hfs1目录下

[root@genewDB ~]# ll
total 20
-rw-r--r--  1 tcpdump tcpdump   24 Sep  7 08:17 B1205F.pcap
drwxr-xr-x  2 root    root       6 May  6 22:19 Desktop
drwxr-xr-x  2 root    root       6 May  6 22:19 Documents
drwxr-xr-x  2 root    root       6 May  6 22:19 Downloads
drwxr-xr-x  2 root    root       6 May  6 22:19 Music
drwxrwxr-x  3 root    root      19 Aug  9 11:38 Netman4000
drwxr-xr-x. 3 root    root      17 May  4 08:50 Orgin_file
drwxr-xr-x  2 root    root       6 May  6 22:19 Pictures
drwxr-xr-x  2 root    root       6 May  6 22:19 Public
-rw-r--r--  1 tcpdump tcpdump 1501 Sep 11 06:07 set_fxs_port.cap
-rw-r--r--  1 tcpdump tcpdump  512 Sep 11 06:03 set+fxs_port.cap
drwxr-xr-x  2 root    root       6 May  6 22:19 Templates
-rw-r--r--  1 tcpdump tcpdump 7167 Aug 17 18:15 tongji.cap
drwxr-xr-x  2 root    root       6 May  6 22:19 Videos
[root@genewDB ~]# pwd
/root
[root@genewDB ~]# scp /root/set_fxs_port.cap root@10.8.12.90:/mnt/hfs1/set_fxs_port.cap
root@10.8.12.90's password: 
set_fxs_port.cap                                                                         100% 1501     1.5KB/s   00:00

方法2:使用SSH Secure File Transfer Client下载到本地;

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值