HTTP实验(ENSP模拟器实现)

HTTP概述

HTTP(HyperText Transfer Protocol,超文本传输协议),设计HTTP最初的目的是为了提供一种发布和接收HTML页面的方法。

  • HTTP定义了多种请求方法,常用的包括:

  • GET:请求资源。

  • POST:提交数据。

  • PUT:更新资源。

  • DELETE:删除资源。

HTTP实验

我们使用一个路由器来模拟客户端

cpp 复制代码
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname Client
[Client]interface G0/0/0
[Client-GigabitEthernet0/0/0]ip address 192.168.1.1 24

Server配置

选择文件根目录,然后启动HTTP服务

使用路由器去发送GET请求

cpp 复制代码
[Client]http get url 192.168.1.2
  Http getting 192.168.1.2[192.168.1.2]: 
   1:packets interaction time 20 ms,the link reachable
   2:packets interaction time 90 ms,the link reachable
   3:packets interaction time 110 ms,the link reachable
   4:packets interaction time 90 ms,the link reachable
   5:packets interaction time 90 ms,the link reachable
  --- http get result statistics ---
    Http Get 5 time(s),succeed 5 time(s),failed 0 time(s).
    round-trip min/avg/max = 90/80/110 ms.

测试访问是没问题的。

但是http是明文传输,所以接口抓包,我们就能看到

我们能直接看到HTTP的,传输的页面内容。

我还可以访问我的一个文件试一试(路径填写你的HTTP服务器,目录下有的文件)

cpp 复制代码
[Client]http get url 192.168.1.2/desktop.ini
  Http getting 192.168.1.2/desktop.ini[192.168.1.2]: 
   1:packets interaction time 60 ms,the link reachable
   2:packets interaction time 90 ms,the link reachable
   3:packets interaction time 90 ms,the link reachable
   4:packets interaction time 100 ms,the link reachable
   5:packets interaction time 90 ms,the link reachable
  --- http get result statistics ---
    Http Get 5 time(s),succeed 5 time(s),failed 0 time(s).
    round-trip min/avg/max = 90/86/100 ms.

再来看看看抓包

传输的文件内容,都是明文的,验证了HTTP是明文传输。

相关推荐
隐擎fox6 小时前
深入理解网络传输层安全:TLS 指纹识别(JA3/JA4)原理与 Python 协议层检测实战
爬虫·python·网络协议·安全·网络安全·https
游戏开发爱好者86 小时前
网络连接排查指南,谁在电脑后台偷跑流量,哪些程序在联网
网络协议·计算机网络·网络安全·ios·adb·https·udp
Databuff6 小时前
AI SSH工具,集齐SSH、SFTP、知识库RAG、AI助手
网络·人工智能·ssh
Jeremy_WW6 小时前
QSFP/QSFP-DD/OSFP 通用管理接口规范(CMIS)解读:13 Page 9Fh
网络·网络协议·信息与通信·光模块·cmis
en.en..8 小时前
OSI七层模型|各层级传输数据单位(详解)
网络
疯狂打码的少年9 小时前
【计算机网络】TCP/IP协议族(四层体系结构,与OSI对比)
网络·笔记·tcp/ip·计算机网络
snow@li10 小时前
服务器运维:Linux命令速查手册(全景梳理)
linux·服务器·网络
布莱克60510 小时前
TCP 三次握手与四次挥手详解
服务器·网络·tcp/ip·计算机网络·网络编程
anxiao_m11 小时前
2026企业AI数字孪生选型攻略,不同场景对应不同解决方案
大数据·网络·数据库
xiaoye-duck12 小时前
《Linux 网络编程》深入理解 TCP 协议(二):序号、确认应答与流量控制机制详解
linux·网络·tcp