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是明文传输。

相关推荐
Chenyu_3105 分钟前
05.MySQL表的约束
android·开发语言·网络·数据库·网络协议·mysql·php
Rocky40119 分钟前
开发的几种格式,TCP的十个重要机制
运维·服务器·网络
异常君30 分钟前
HTTP vs HTTPS:深入理解加密传输的原理与实现
java·http·https
三体世界2 小时前
Linux --TCP协议实现简单的网络通信(中英翻译)
linux·c语言·开发语言·网络·c++·windows·tcp/ip
superconvert2 小时前
最快的流媒体服务器搭建 smart_rtmpd
http·webrtc·rtmp·h264·hls·无人直播·dash·rtsp·gb28181·srt·m3u8·vlc·sfu·obs·flv
zqx_72 小时前
随记 配置服务器的ssl整个过程
网络·网络协议·ssl
ywyy67983 小时前
小程序定制开发:从需求到落地,打造企业专属数字化入口
大数据·网络·人工智能·小程序·短剧
GoldenaArcher3 小时前
Fullstack 面试复习笔记:操作系统 / 网络 / HTTP / 设计模式梳理
网络·笔记·面试
茶本无香3 小时前
HTTP协议接口三种测试方法之-JMeter(保姆教程)
网络协议·jmeter·http
superior tigre4 小时前
神经网络基础:从单个神经元到多层网络(superior哥AI系列第3期)
网络·人工智能·神经网络