目录

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

本文是转载文章,点击查看原文
如有侵权,请联系 xyy@jishuzhan.net 删除
相关推荐
为你写首诗ge4 小时前
【Unity网络编程知识】FTP学习
网络·unity
@hdd5 小时前
Qt实现HTTP GET/POST/PUT/DELETE请求
qt·http
神经毒素6 小时前
WEB安全--文件上传漏洞--一句话木马的工作方式
网络·安全·web安全·文件上传漏洞
swift开发pk OC开发6 小时前
如何轻松查看安卓手机内存,让手机更流畅
websocket·网络协议·tcp/ip·http·网络安全·https·udp
慵懒学者7 小时前
15 网络编程:三要素(IP地址、端口、协议)、UDP通信实现和TCP通信实现 (黑马Java视频笔记)
java·网络·笔记·tcp/ip·udp
itachi-uchiha7 小时前
关于UDP端口扫描概述
网络·网络协议·udp
liulilittle7 小时前
Linux 高级路由策略控制配置:两个不同路由子网间通信
linux·网络·智能路由器
swift开发pk OC开发8 小时前
flutter框架中文文档,android智能手机编程答案
websocket·网络协议·tcp/ip·http·网络安全·https·udp
RadNIkMan9 小时前
Python学习(二)操作列表
网络·python·学习
HX科技9 小时前
Debian系统_主板四个网口1个配置为WAN,3个配置为LAN
linux·运维·网络·debian