zoukankan      html  css  js  c++  java
  • 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下载到本地;

  • 相关阅读:
    RabbitMq环境搭建
    Springboot集成quartz
    java8时间工具类
    AngularJS学习笔记之directive——scope选项与绑定策略
    理解$watch ,$apply 和 $digest --- 理解数据绑定过程
    AngularJS中service,factory,provider的区别
    AngularJS的Filter用法详解
    Angular.js中使用$watch监听模型变化
    history
    data-*
  • 原文地址:https://www.cnblogs.com/lujingxia/p/10765395.html
Copyright © 2011-2022 走看看