Wireshark+Telnet进行tcp抓包

准备好工具:
Wireshark
Telnet
ping

目标网站:www.baidu.com
开始:
通过ping获取ip地址

PS D:\桌面> ping www.baidu.com                                                       
正在 Ping www.a.shifen.com [183.2.172.42] 具有 32 字节的数据:
来自 183.2.172.42 的回复: 字节=32 时间=22ms TTL=51
来自 183.2.172.42 的回复: 字节=32 时间=21ms TTL=51
来自 183.2.172.42 的回复: 字节=32 时间=23ms TTL=51

开始设置Wireshark的过滤设置:

ip.addr == 183.2.172.42 and tcp

开始使用Telnet连接www.baidu.com,进行http连接!

#先连接
PS D:\桌面> telnet www.baidu.com 80 

#按下ctrl+],进入控制模式,按下回车输入
GET /index.html HTTP/1.1
Host: www.baidu.com
#得到下面的回复

HTTP/1.1 302 Found
Bdpagetype: 3
Content-Length: 154
Content-Type: text/html
Date: Sat, 11 May 2024 07:53:01 GMT
Location: https://www.baidu.com/search/error.html
Server: BWS/1.1
Set-Cookie: BDSVRTM=0; path=/
Traceid: 1715413981153071309816512077002893694531
X-Ua-Compatible: IE=Edge,chrome=1
X-Xss-Protection: 1;mode=block

<html>
<head><title>302 Found</title></head>
<body bgcolor="white">
<center><h1>302 Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

#继续按下ctrl+],输入close就可以关闭连接,成功完成四次挥手

成功抓包:
请添加图片描述

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值