tcpreplay使用介绍
安装
brew install tcpreplay
yum install tcpreplay
tcpreplay 回放
tcpreplay is a tool for replaying network traffic from files saved with tcpdump or other tools which write pcap(3) files.
tcpreplay回放的报文要具备一定的格式pcap,格式不对,无法回放
使用网卡en0,报文syn.pcap回放10次
tcpreplay -i en0 -l 10 syn.pcap
tcpprep过滤报文;帮助信息 man tcpprep
tcpprep is a 'pcap(3)' file pre-processor which creates a cache file which provides "rules" for 'tcprewrite(1)' and 'tcpreplay(1)' on how to process and send packets
The basic operation of tcpreplay is to resend all packets from the input file(s) out a single file. Tcpprep processes a pcap file and applies a set of user-specified rules to create a cache file which tells tcpreplay whether or not to send each packet and which interface the packet should be sent out of.
For more details, please see the Tcpreplay Manual at: http://tcpreplay.appneta.com
tcpreplay默认回放*.pcap里所有的报文,而tcpprep的作用是进行过滤,通过过滤留下某些报文
生成目的端口为80的报文缓存文件
tcpprep -i *.pcap -o *.cache -p 80
tcprewrite 修改报文
Tcprewrite is a tool to rewrite packets stored in pcap(3) file format, such as created by tools such as tcpdump(1) and wireshark(1). Once a pcap file has had it's packets rewritten, they can be replayed back out on the network using tcpreplay(1)
把报文的端口修改为80->8080
tcprewrite -r 80:8080 -i syn-2.pcap -o test.pcap
tcpreplay-edit 直接回放编辑后的报文,不生成中间文件
遗留问题
有没有tcp拦截修改报文的工具?
参考
https://tcpreplay.appneta.com/wiki/captures.html
tcpreplay使用介绍的更多相关文章
- tcpreplay的使用指导
Tcpreplay的介绍 简单的说, tcpreplay是一种pcap包的重放工具, 它可以将用ethreal, wireshark工具抓下来的包原样或经过任意修改后重放回去. 它允许你对报文做任意的 ...
- tcpreplay,tcprewrite的使用---张子芳
[关键字]: tcpreplay, tcpprep, tcprewrite, libpcap, winpcap, linux, windows, cygwin[摘要]: 本文总结了tcpreplay的 ...
- TCPReplay使用---张子芳
TCPReplay主要功能是将PCAP包重新发送,用于性能或者功能测试.但是在测试环境与原转包系统结构一般是不同的.比如被测试机的二层MAC地址与抓包机器的MAC不同,所以被测试机在二层处理时发现目的 ...
- tcpreplay安装使用
#Author: ypguo#Data: 2010.4.23#Version: 1.2 增加了修改VLAN tag内容. 1.1 修改了cygwin下安装的内容 ...
- tcpreplay安装使用经验
tcpreplay安装使用经验 #Author: ypguo#Data: 2010.4.23#Version: 1.2 增加了修改VLAN tag内容. 1.1 ...
- CSS3 background-image背景图片相关介绍
这里将会介绍如何通过background-image设置背景图片,以及背景图片的平铺.拉伸.偏移.设置大小等操作. 1. 背景图片样式分类 CSS中设置元素背景图片及其背景图片样式的属性主要以下几个: ...
- MySQL高级知识- MySQL的架构介绍
[TOC] 1.MySQL 简介 概述 MySQL是一个关系型数据库管理系统,由瑞典MySQL AB公司开发,目前属于Oracle公司. MySQL是一种关联数据库管理系统,将数据保存在不同的表中,而 ...
- Windows Server 2012 NIC Teaming介绍及注意事项
Windows Server 2012 NIC Teaming介绍及注意事项 转载自:http://www.it165.net/os/html/201303/4799.html Windows Ser ...
- Linux下服务器端开发流程及相关工具介绍(C++)
去年刚毕业来公司后,做为新人,发现很多东西都没有文档,各种工具和地址都是口口相传的,而且很多时候都是不知道有哪些工具可以使用,所以当时就想把自己接触到的这些东西记录下来,为后来者提供参考,相当于一个路 ...
随机推荐
- greenplum 表在各个节点数据的分布情况
select gp_segment_id,count(*) from table_name group by gp_segment_id;
- RookeyFrame 加载 自定义JS
注意JS存放的位置:是在model文件夹下的某某文件夹!!! 线上添加的模块: 1.JS文件名:和表名一致 2.JS目录:Rookey.BusSys.Web\Scripts\model\TempMod ...
- RookeyFrame 迁移 线下Model 新增属性 迁移 到数据库
在类库 Rookey.BusSys.Operate(类库) -> InitOperate.cs(类) -> App_Start(方法) 添加代码(举例): ToolOperate.Rep ...
- Video Reviews
题目链接:http://codeforces.com/gym/101755/problem/K 题目理解: 一家公司想让n个人给他们的产品评论,所以依次去找这n个人,第i个人会评论当且仅当已经有ai个 ...
- Pytest权威教程21-API参考-03-夹具(Fixtures)
目录 夹具(Fixtures) @ pytest.fixture config.cache的 capsys capsysbinary capfd capfdbinary doctest_namespa ...
- CAN信号转以太网究竟怎么回事?TCP转CAN又是什么?
首先说说can总线. can总线是目前工业控制领域应用最广的现场总线,它可以实现远距离信息的传输,是各种设备和各类功能部件之间传送信息的公用通道,它是由导线组成的传输线束,用于连接体统中的各个节点,传 ...
- SpringMVC通过注解在数据库中自动生成表
在application-persistence.xml中的<property name="hibernate.hbm2ddl.auto" value="${hib ...
- ls命令的简单实现
ls命令的简单实现 目标:简单的实现ls命令 实现的mic_ls命令主要功能 1.循环遍历目录 2.列出目标目录所有的子目录和文件 3.列出文件的文件权限,所有者,文件大小等详细信息 参数 -r 循环 ...
- android x86 安装
1.下载页面 http://www.android-x86.org 下载了: android-x86-8.1-r2.iso 用Win32DiskImager制作usb启动盘. 参考: https:// ...
- c++ 模拟java的反射,根据类名动态创建类
参考: https://blog.csdn.net/jnu_simba/article/details/9318799 原先有静态变量依赖问题, https://blog.csdn.net/anony ...