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

相关推荐
中屹指纹浏览器svip9 分钟前
只用指纹浏览器,不搭配IP可以吗?
网络
jimmyleeee27 分钟前
Agent安全之八:OWASP ASI08 级联失效------当每一个 Agent 都“正确”,系统却走向灾难
网络·安全·web安全
缓慢更新32 分钟前
AI 辅助生成单测:从接口定义到用例的流水线
java·服务器·前端·网络·数据库·人工智能
叼烟扛炮1 小时前
Linux 学习笔记(四十一):TCP 并发演进——从单进程到多线程服务器
linux·运维·服务器·网络·笔记·学习·tcp/ip
叼烟扛炮1 小时前
Linux 学习笔记(四十三):网络编程进阶——自定义协议解决 TCP 粘包与守护进程
linux·开发语言·网络·笔记·tcp/ip
Escalating_xu2 小时前
【Linux 网络编程】DNS 与 ICMP:从域名解析到 ping、traceroute,把“网络通不通”问清楚
linux·网络·php
黑十4 小时前
PyTorch 报 “no CUDA GPUs are available“ 怎么办?3 步排查
服务器·网络·人工智能·pytorch·python
updayday8546 小时前
客户附件不该发往旧邮箱,如何在发送前拦截 - Ping64 邮件安全管控
大数据·网络·数据库·安全·智能路由器
其实防守也摸鱼6 小时前
Chrome 扩展安全攻防实录:从攻击面到防御实践
开发语言·前端·网络·chrome·安全·web安全·php
小茬粥6 小时前
QEMU 宿主机网卡实例发现与采集脚本(标准 Linux / Proxmox VE 适配版)COLT_CMDB_QEMU_IFACE.sh
网络