tcpdump Demo
tcpdump Demo
lxw ~$ tcpdump -i eth0
tcpdump: eth0: You don't have permission to capture on that device
(socket: Operation not permitted)
lxw ~$ sudo tcpdump -i eth0 -c #-i指定监听接口interface -c指定监听个数
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size bytes
::32.336082 IP6 fe80:::2ee6:ac6f:c9a4. > ff02:::.hostmon: UDP, length
::32.336178 IP 192.168.236.1. > 224.0.0.252.hostmon: UDP, length
packets captured
packets received by filter
packets dropped by kernel
lxw ~$ sudo tcpdump -i eth0 -c -w 20141227_1546.pcap #-w写入文件
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size bytes
packets captured
packets received by filter
packets dropped by kernel
lxw ~$ tcpdump -r 20141227_1546.pcap #-r从文件中读取
reading from file 20141227_1546.pcap, link-type EN10MB (Ethernet)
::20.602350 IP 192.168.236.156. > 192.168.236.2.domain: + A? tiles.services.mozilla.com. ()
::20.603151 IP 192.168.236.156. > 192.168.236.2.domain: + AAAA? tiles.services.mozilla.com. ()
::20.606409 IP 192.168.236.156. > 192.168.236.2.domain: + A? tiles.services.mozilla.com. ()
lxw ~$ sudo tcpdump -i eth0 -tttt #-t/-tt/-ttt/-tttt/-ttttt时间戳(各个含义,参见man tcpdump)
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size bytes
-- ::15.480571 IP 192.168.236.156. > assets-ubuntu-com.eggfruit.canonical.com.http: Flags [.], ack , win , length
...
packets captured
packets received by filter
packets dropped by kernel
lxw ~$ sudo tcpdump -i eth0 arp #指定抓包的协议类型(ip/ip6/arp/tcp/udp)
lxw ~$ sudo tcpdump -i eth0 tcp and port #指定抓包端口port
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size bytes
::46.460864 IP 192.168.236.156. > 59.24.3.173.http: Flags [S], seq , win , options [mss ,sackOK,TS val ecr ,nop,wscale ], length
lxw ~$ sudo tcpdump -i eth0 tcp and src 192.168.236.156 and port
Reference:
tcpdump使用9个实例: http://blog.csdn.net/zj0910/article/details/12869977
tcpdump Demo的更多相关文章
- 我为什么要谈KeepAlive(文末增加nginx 负载tcp长连接保持 demo)
http://blog.sina.com.cn/s/blog_e59371cc0102ux5w.html 最近工作中遇到一个问题,想把它记录下来,场景是这样的: 从上图可以看出,用户通过Client访 ...
- Java高效开发-SSH+Wireshark+tcpdump组合拳
目标 实现抓取远程服务器的数据包在wireshark中展示,不需要频繁使用tcpdump抓包后保存为cap数据包,在进行从服务器下载进行解析: 工具 1.ssh win10默认没有开启ssh服务端的, ...
- 通过一个demo了解Redux
TodoList小demo 效果展示 项目地址 (单向)数据流 数据流是我们的行为与响应的抽象:使用数据流能帮我们明确了行为对应的响应,这和react的状态可预测的思想是不谋而合的. 常见的数据流框架 ...
- 很多人很想知道怎么扫一扫二维码就能打开网站,就能添加联系人,就能链接wifi,今天说下这些格式,明天做个demo
有些功能部分手机不能使用,网站,通讯录,wifi基本上每个手机都可以使用. 在看之前你可以扫一扫下面几个二维码先看看效果: 1.二维码生成 网址 (URL) 包含网址的 二维码生成 是大家平时最常接触 ...
- 在线浏览PDF之PDF.JS (附demo)
平台之大势何人能挡? 带着你的Net飞奔吧!:http://www.cnblogs.com/dunitian/p/4822808.html#skill 下载地址:http://mozilla.gith ...
- 【微框架】Maven +SpringBoot 集成 阿里大鱼 短信接口详解与Demo
Maven+springboot+阿里大于短信验证服务 纠结点:Maven库没有sdk,需要解决 Maven打包找不到相关类,需要解决 ps:最近好久没有写点东西了,项目太紧,今天来一篇 一.本文简介 ...
- 如何利用tcpdump对mysql进行抓包操作
命令如下: tcpdump -s -l -w - dst -i eno16777736 |strings 其中-i指定监听的网络接口,在RHEL 7下,网络接口名不再是之前的eth0,而是 eno16 ...
- vue双向数据绑定原理探究(附demo)
昨天被导师叫去研究了一下vue的双向数据绑定原理...本来以为原理的东西都非常高深,没想到vue的双向绑定真的很好理解啊...自己动手写了一个. 传送门 双向绑定的思想 双向数据绑定的思想就是数据层与 ...
- Android Studio-—使用OpenCV的配置方法和demo以及开发过程中遇到的问题解决
前提: 1.安装Android Studio(过程略) 2.官网下载OpenCV for Android 网址:http:opencv.org/downloads.html 我下载的是下图的版本 3. ...
随机推荐
- 【转载】checkbox复选框的一些深入研究与理解
转载来自:原创文章,转载请注明来自张鑫旭-鑫空间-鑫生活[http://www.zhangxinxu.com] 一.一开始的唠叨最近忙于开发,自淫于项目的一步步完工,心浮躁了.舍近而求远,兵家之大忌. ...
- C语言基础(19)-结构体,联合体,枚举和typedef
一.结构体 1.1 结构体struct定义及初始化 #include <stdio.h> // 这个头文件在系统目录下 #include <stdlib.h> // 使用了sy ...
- Linux学习之tune2fs
这是Linux系统用于文件系统自检的工具. 常用选项 -l 查看文件系统信息 -c max-mount-counts 设置强制自检的挂载次数,如果开启,每挂载一次mount conut就会加1,超过次 ...
- Dig HOWTO 中文手册--dig命令使用大全
Dig HOWTO 中文手册--dig命令使用大全 DNS -- 本人翻译的dig howto手册. 译者序: 可以这样说,翻译本篇文档的过程就是我重新学习DNS的过程,dig命令可以帮助我们学习DN ...
- Modification of UCT with Patterns in Monte-Carlo Go(论文阅读)
摘要:用于解决多臂赌博机UCB1算法已经被扩展成了解决极大极小树搜索的UCT算法.我们开发了一套Monte-Carlo围棋程序,MoGo,这是第一个使用UCT算法实现的计算机围棋程序.我们解释了为了围 ...
- Sphinx 安装与使用(2)-- 配置Coreseek
1.必须先关闭守护进程才能做其他的操作(第一次启动不需要这一步) /usr/local/coreseek/bin/searchd --config /usr/local/coreseek/etc/te ...
- input type="file"文件上传时得到文件的本地路劲
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <meta name=& ...
- C++标准库之condition_variable
conditon_variable(条件变量)用于线程间同步 condition_variable有5个函数,函数名及对应的功能如下: wait阻塞自己,等待唤醒 wait_for阻塞自己,等待唤醒, ...
- 第二百零三节,jQuery EasyUI,Window(窗口)组件
jQuery EasyUI,Window(窗口)组件 学习要点: 1.加载方式 2.属性列表 3.事件列表 4.方法列表 本节课重点了解 EasyUI 中 Window(窗口)组件的使用方法,这个组件 ...
- python django -7 Git与项目
git的使用,主要包括: 本地仓库的命令 远程仓库的命令 项目需求.页面.模型类的设计,及页面的使用 Git简介 Git是目前世界上最先进的分布式版本控制系统 安装 sudo apt-get inst ...