【中国国际航空-注册/登录安全分析报告】

news2024/9/19 21:10:37

前言

由于网站注册入口容易被黑客攻击,存在如下安全问题:

1. 暴力破解密码,造成用户信息泄露

2. 短信盗刷的安全问题,影响业务及导致用户投诉

3. 带来经济损失,尤其是后付费客户,风险巨大,造成亏损无底洞

在这里插入图片描述

所以大部分网站及App 都采取图形验证码或滑动验证码等交互解决方案, 但在机器学习能力提高的当下,连百度这样的大厂都遭受攻击导致点名批评, 图形验证及交互验证方式的安全性到底如何? 请看具体分析

一、 中国国际航空PC 注册入口

简介:中国国际航空股份有限公司简称“国航”,英文名称为“Air China Limited”,简称“Air China”,其前身中国国际航空公司成立于1988年。根据国务院批准通过的《民航体制改革方案》,2002年10月,中国国际航空公司联合中国航空总公司和中国西南航空公司,成立了中国航空集团公司,并以联合三方的航空运输资源为基础,组建新的中国国际航空公司。2004年9月30日,经国务院国有资产监督管理委员会批准,作为中国航空集团控股的航空运输主业公司,国航股份在北京正式成立。2004年12月15日,中国国际航空股份有限公司在香港(股票代码0753)和伦敦(交易代码AIRC)成功上市。
在这里插入图片描述

在这里插入图片描述

二、 安全性分析报告:

中国国际航空自己研发的滑动验证码,容易被模拟器绕过甚至逆向后暴力攻击,滑动拼图识别率在 95% 以上。
在这里插入图片描述

三、 测试方法:

  前端界面分析,这是中国国际航空自己研发的滑动验证码,网上没有现成的教学视频,但形式都差不多,难点:

. 防模拟器鼠标,物理鼠标和逻辑鼠标定位不一致判断措施,解决思路为让JS 这部分代码失效或这采用 物理定位鼠标的部分,目前采用的是物理鼠标的方式。
这次还是采用模拟器的方式,关键点主要模拟器交互、距离识别和轨道算法3部分
在这里插入图片描述

1. 模拟器交互部分


private final String INDEX_URL = "https://www.airchina.com.cn/user/register?backUrl=/&entryPage=login";

	@Override
	public RetEntity send(WebDriver driver, String areaCode, String phone) {
		try {
			RetEntity retEntity = new RetEntity();
			driver.get(INDEX_URL);

			// 输入手机号
			WebElement phoneElemet = driver.findElement(By.xpath("//input[@placeholder='手机号']"));
			phoneElemet.sendKeys(phone);

			// 点击发送验证码按钮
			WebElement sendElemet = driver.findElement(By.xpath("//div/div/div[text()='获取验证码']"));
			if (sendElemet != null)
				sendElemet.click();

			Thread.sleep(1000);
			WebElement gtElemet = ChromeDriverManager.waitElement(driver, By.xpath("//div/div[contains(text(),'验证码已发送')]"), 1);
			String gtInfo = (gtElemet != null) ? gtElemet.getText() : null;
			boolean isSend = (gtInfo != null && gtInfo.contains("验证码已发送"));
			if (!isSend) {
				// pic 1 get big
				WebElement bigImgElement = ChromeDriverManager.waitElement(driver, By.id("cpc_img"), 20);
				String bigImgUrl = bigImgElement.getAttribute("src");
				byte[] bigBytes = GetImage.callJsByUrl(driver, bigImgUrl);
				int bigLen = (bigBytes != null) ? bigBytes.length : 0;
				if (bigLen < 100) {
					System.out.println("bigImgUrl=" + bigImgUrl + "->bigLen=" + bigLen);
					return null;
				}

				// pic 2 get small
				WebElement smallImgElement = driver.findElement(By.id("small_img"));
				String smallSrc = smallImgElement.getAttribute("src");
				byte[] smallBytes = GetImage.callJsByUrl(driver, smallSrc);
				if (smallBytes == null) {
					System.out.println("smallBytes=" + smallBytes);
					return null;
				}

				String ckSum = GenChecksumUtil.genChecksum(bigBytes);
				Map<String, Double> openResult = openCv2.getOpenCvDistance(ckSum, bigBytes, smallBytes, "Airchina", 1);
				if (openResult == null || openResult.size() < 2) {
					System.out.println("ckSum=" + ckSum + "->openResult=" + openResult);
					return null;
				}
				Double r = 421.0 / 275;
				BigDecimal disD = new BigDecimal(openResult.get("minX") * r).setScale(0, BigDecimal.ROUND_HALF_UP);
				int distance = disD.intValue();
				ActionMove.RobotMove(777, 710, distance);
				System.out.println("distance=" + distance);
				Thread.sleep(1000);
			}
			gtElemet = ChromeDriverManager.waitElement(driver, By.xpath("//div/div[contains(text(),'验证码已发送')]"), 100);
			gtInfo = (gtElemet != null) ? gtElemet.getText() : null;
			retEntity.setMsg(gtInfo);
			if (gtInfo != null && gtInfo.contains("验证码已发送")) {
				retEntity.setRet(0);
			} else {
				System.out.println("gtInfo=" + gtInfo);
			}
			return retEntity;
		} catch (Exception e) {
			System.out.println("phone=" + phone + ",e=" + e.toString());
			for (StackTraceElement ele : e.getStackTrace()) {
				System.out.println(ele.toString());
			}
			return null;
		} finally {
			driver.manage().deleteAllCookies();
		}
	}

2. 距离识别

	/**
	 * 
	 * @param ckSum
	 * @param bigBytes
	 * @param smallBytes
	 * @param factory
	 * @return { width, maxX }
	 */

	public Map<String, Double> getOpenCvDistance(String ckSum, byte bigBytes[], byte smallBytes[], String factory, int border) {
		try {
			String basePath = ConstTable.codePath + factory + "/";
			File baseFile = new File(basePath);
			if (!baseFile.isDirectory()) {
				baseFile.mkdirs();
			}
			// 小图文件
			File smallFile = new File(basePath + ckSum + "_s.png");
			FileUtils.writeByteArrayToFile(smallFile, smallBytes);

			// 大图文件
			File bigFile = new File(basePath + ckSum + "_b.png");
			FileUtils.writeByteArrayToFile(bigFile, bigBytes);
			// 边框清理(去干扰)
			byte[] clearBoder = (border > 0) ? ImageIOHelper.clearBoder(smallBytes, border) : smallBytes;
			File tpFile = new File(basePath + ckSum + "_t.png");
			FileUtils.writeByteArrayToFile(tpFile, clearBoder);

			String resultFile = basePath + ckSum + "_o.png";
			return getWidth(tpFile.getAbsolutePath(), bigFile.getAbsolutePath(), resultFile);
		} catch (Throwable e) {
			logger.error("getMoveDistance() ckSum=" + ckSum + " " + e.toString());
			for (StackTraceElement elment : e.getStackTrace()) {
				logger.error(elment.toString());
			}
			return null;
		}
	}

	/**
	 * Open Cv 图片模板匹配
	 * 
	 * @param smallPath
	 *            模板图片路径
	 * @param bgPath
	 *            目标图片路径
	 * @return { width, maxX }
	 */
	public Map<String, Double> getWidth(String smallPath, String bgPath, String resultFile) {
		try {
			Rect rectCrop = clearWhite(smallPath);
			Mat g_tem = Imgcodecs.imread(smallPath);
			Mat clearMat = g_tem.submat(rectCrop);

			Mat cvt = new Mat();
			Imgproc.cvtColor(clearMat, cvt, Imgproc.COLOR_RGB2GRAY);
			Mat edgesSlide = new Mat();
			Imgproc.Canny(cvt, edgesSlide, threshold1, threshold2);
			Mat cvtSlide = new Mat();
			Imgproc.cvtColor(edgesSlide, cvtSlide, Imgproc.COLOR_GRAY2RGB);
			Imgcodecs.imwrite(smallPath, cvtSlide);

			Mat g_b = Imgcodecs.imread(bgPath);
			Mat edgesBg = new Mat();
			Imgproc.Canny(g_b, edgesBg, threshold1, threshold2);
			Mat cvtBg = new Mat();
			Imgproc.cvtColor(edgesBg, cvtBg, Imgproc.COLOR_GRAY2RGB);

			int result_rows = cvtBg.rows() - cvtSlide.rows() + 1;
			int result_cols = cvtBg.cols() - cvtSlide.cols() + 1;
			Mat g_result = new Mat(result_rows, result_cols, CvType.CV_32FC1);
			Imgproc.matchTemplate(cvtBg, cvtSlide, g_result, Imgproc.TM_CCOEFF_NORMED); // 归一化平方差匹配法
			// 归一化相关匹配法
			MinMaxLocResult minMaxLoc = Core.minMaxLoc(g_result);
			Point maxLoc = minMaxLoc.maxLoc;
			Imgproc.rectangle(cvtBg, maxLoc, new Point(maxLoc.x + cvtSlide.cols(), maxLoc.y + cvtSlide.rows()), new Scalar(0, 0, 255), 1);
			Imgcodecs.imwrite(resultFile, cvtBg);
			Map<String, Double> paramMap = new HashMap<String, Double>();
			paramMap.put("tpWidth", g_tem.cols() * 1.0);
			paramMap.put("bigWidth", cvtBg.cols() * 1.0);
			paramMap.put("width", cvtSlide.cols() * 1.0);
			paramMap.put("minX", maxLoc.x);
			paramMap.put("maxX", maxLoc.x + cvtSlide.cols());
			System.out.println("OpenCv2.getWidth() " + paramMap.toString());
			return paramMap;
		} catch (Throwable e) {
			System.out.println("getWidth() " + e.toString());
			logger.error("getWidth() " + e.toString());
			for (StackTraceElement elment : e.getStackTrace()) {
				logger.error(elment.toString());
			}
			return null;
		}
	}

	public Rect clearWhite(String smallPath) {
		try {
			Mat matrix = Imgcodecs.imread(smallPath);
			int rows = matrix.rows();// height -> y
			int cols = matrix.cols();// width -> x
			System.out.println("OpenCv2.clearWhite()  rows=" + rows + ",cols=" + cols);
			Double rgb;
			double[] arr;
			int minX = 255;
			int minY = 255;
			int maxX = 0;
			int maxY = 0;
			Color c;
			for (int x = 0; x < cols; x++) {
				for (int y = 0; y < rows; y++) {
					arr = matrix.get(y, x);
					rgb = 0.00;
					for (int i = 0; i < 3; i++) {
						rgb += arr[i];
					}
					c = new Color(rgb.intValue());
					int b = c.getBlue();
					int r = c.getRed();
					int g = c.getGreen();
					int sum = r + g + b;
					if (sum >= 5) {
						if (x <= minX)
							minX = x;
						else if (x >= maxX)
							maxX = x;
						if (y <= minY)
							minY = y;
						else if (y >= maxY)
							maxY = y;
					}
				}
			}

			int boder = 1;
			if (boder > 0) {
				minX = (minX > boder) ? minX - boder : 0;
				maxX = (maxX + boder < cols) ? maxX + boder : cols;
				minY = (minY > boder) ? minY - boder : 0;
				maxY = (maxY + boder < rows) ? maxY + boder : rows;
			}

			int width = (maxX - minX);
			int height = (maxY - minY);
			System.out.println("openCv2 minX=" + minX + ",minY=" + minY + ",maxX=" + maxX + ",maxY=" + maxY + "->width=" + width + ",height=" + height);
			Rect rectCrop = new Rect(minX, minY, width, height);
			return rectCrop;
		} catch (Throwable e) {
			StringBuffer er = new StringBuffer("clearWrite() " + e.toString() + "\n");
			for (StackTraceElement elment : e.getStackTrace()) {
				er.append(elment.toString() + "\n");
			}
			logger.error(er.toString());
			System.out.println(er.toString());
			return null;
		}
	}

3. 轨道生成及移动算法

/**
* 双轴轨道生成算法,主要实现平滑加速和减速
*
* @param distance
* @return
*/
public static List<Integer[]> getXyTrack(int distance) {
boolean isPrn = false;
List<Integer[]> track = new ArrayList<Integer[]>();// 移动轨迹
try {
int a = (int) (distance / 3.0) + random.nextInt(10);
int h = 0, current = 0;// 已经移动的距离
BigDecimal midRate = new BigDecimal(0.7 + (random.nextInt(10) / 100.00)).setScale(4, BigDecimal.ROUND_HALF_UP);
BigDecimal mid = new BigDecimal(distance).multiply(midRate).setScale(0, BigDecimal.ROUND_HALF_UP);// 减速阈值
BigDecimal move = null;// 每次循环移动的距离
List<Integer[]> subList = new ArrayList<Integer[]>();// 移动轨迹
boolean plus = true;
Double t = 0.18, v = 0.00, v0;
while (current <= distance) {
h = random.nextInt(2);
if (current > distance / 2) {
h = h * -1;
}
v0 = v;
v = v0 + a * t;
move = new BigDecimal(v0 * t + 1 / 2 * a * t * t).setScale(4, BigDecimal.ROUND_HALF_UP);// 加速
if (move.intValue() < 1)
move = new BigDecimal(1L);
if (plus) {
track.add(new Integer[] { move.intValue(), h });
} else {
subList.add(0, new Integer[] { move.intValue(), h });
}
current += move.intValue();
if (plus && current >= mid.intValue()) {
plus = false;
move = new BigDecimal(0L);
v = 0.00;
}
}
track.addAll(subList);
int bk = current - distance;
if (bk > 0) {
for (int i = 0; i < bk; i++) {
track.add(new Integer[] { -1, h });
}
}
if (isPrn)
System.out.println(“getMoveTrack(” + midRate + “) a=” + a + “,distance=” + distance + " -> mid=" + mid.intValue() + " size=" + track.size());
return track;
} catch (Exception e) {
System.out.print(e.toString());
return null;
}
}

4. 采用物理鼠标定位方式

/**
	 * 物理鼠标移动模式
	 * 
	 * @param beginX
	 * @param beginY
	 * @param distance
	 */
	public static boolean RobotMove(int beginX, int beginY, int distance) {
		Robot robot = null;
		Double curX = null, curY = null;
		boolean isPrn = false;
		try {
			robot = new Robot();
			// 从当前位置移动到滑动条位置
			Point location = MouseInfo.getPointerInfo().getLocation();
			curX = location.getX();
			curY = location.getY();
			Double xAdd = beginX - curX;
			Double yAdd = beginY - curY;
			if (isPrn)
				System.out.println("RobotMove() init(curX=" + curX + ",curY=" + curY + ",xAdd=" + xAdd + ",yAdd=" + yAdd + ")");
			Double p = (xAdd.compareTo(yAdd) >= 0) ? Math.abs(yAdd) : Math.abs(xAdd);
			Double moveX = curX;
			Double moveY = curY;
			for (int k = 0; k < p.intValue(); k++) {
				moveX += xAdd / p;
				moveY += yAdd / p;
				robot.mouseMove(moveX.intValue(), moveY.intValue());
				robot.delay(1);
			}
			robot.mouseMove(beginX, beginY);
			robot.mousePress(InputEvent.BUTTON1_MASK); // 按下左键
			List<Integer[]> track = ActionMove.getXyTrack(distance);
			int abX = beginX;
			int abY = beginY;
			long begin, cost;
			int total = track.size();
			Integer[] move;
			long sleep = 0;
			Double singTime = (1 + distance / 50.0) * 600 / distance;
			if (isPrn)
				System.out.println("move begin from(" + curX + "," + curY + ") singTime=" + singTime);
			StringBuffer sb = new StringBuffer();
			for (int i = 0; i < total; i++) {
				begin = System.currentTimeMillis();
				move = track.get(i);
				int x = move[0];
				int y = move[1];
				abY += y;
				if (isPrn)
					System.out.println("  move(" + move[0] + ")");
				int len = Math.abs(x);
				for (int k = 0; k < len; k++) {
					abX += (x > 0) ? 1 : -1;
					robot.mouseMove(abX, abY);
					if (k < len - 1) {
						cost = System.currentTimeMillis() - begin;
						if (len <= 6) {
							double start = singTime / (len - 1);
							double range = start - singTime / (len + 1);
							sleep = new BigDecimal(start - (range / len * (k + 1))).setScale(0, BigDecimal.ROUND_HALF_UP).longValue();
						} else {
							sleep = new BigDecimal((singTime - cost) / (len - k)).setScale(0, BigDecimal.ROUND_HALF_UP).longValue();
						}
						if (sleep > 0)
							Thread.sleep(sleep);
						sb.append(",[x=" + x + ",k=" + k + ",sleep=" + sleep + "]");
					}
				}
				if (isPrn && sb.length() > 0)
					System.out.println("  |--" + sb.toString());
				cost = System.currentTimeMillis() - begin;
				if (cost < singTime) {
					sleep = singTime.longValue() - cost;
					if (sleep > 0)
						Thread.sleep(sleep);
					if (isPrn)
						System.out.println("  |-- x=" + x + ",end sleep=" + sleep);
				} else if (isPrn) {
					System.out.println("  |-- x=" + x + ",end cost=" + cost);
				}
			}
			robot.delay(20);
			return true;
		} catch (Throwable e) {
			System.out.print("RobotMove() " + e.toString());
			return false;
		} finally {
			if (robot != null) {
				robot.mouseRelease(InputEvent.BUTTON1_MASK); // 松开左键
				robot.mouseMove(curX.intValue(), curY.intValue());
			}
		}
	}

四丶结语

中国国际航空公司联合中国航空总公司和中国西南航空公司,成立了中国航空集团公司,作为航空领域的翘楚,依托国有资源,技术实力雄厚, 人才济济,在吸取了同行滑动验证码的经验后,自己研发了独特风格的那个验证码, 从逆向代码来看, 不仅借鉴了同行的技术原理,还在防抓取上下了功夫,

  1. 防模拟器鼠标,物理鼠标和逻辑鼠标定位不一致判断措施,解决思路为让JS 这部分代码失效或这采用 物理定位鼠标的部分,目前采用的是物理鼠标的方式。
    从这两、点看,的确让初级黑客止步,但本质上, 前端技术都是暴露在浏览器,不管是JS 注入还是后端代理模式,都会让这些小技巧无效。

很多人在短信服务刚开始建设的阶段,可能不会在安全方面考虑太多,理由有很多。
比如:“ 需求这么赶,当然是先实现功能啊 ”,“ 业务量很小啦,系统就这么点人用,不怕的 ” , “ 我们怎么会被盯上呢,不可能的 ”等等。

有一些理由虽然有道理,但是该来的总是会来的。前期欠下来的债,总是要还的。越早还,问题就越小,损失就越低。

所以大家在安全方面还是要重视。(血淋淋的栗子!)#安全短信#

戳这里→康康你手机号在过多少网站注册过!!!

谷歌图形验证码在AI 面前已经形同虚设,所以谷歌宣布退出验证码服务, 那么当所有的图形验证码都被破解时,大家又该如何做好防御呢?

>>相关阅读
《腾讯防水墙滑动拼图验证码》
《百度旋转图片验证码》
《网易易盾滑动拼图验证码》
《顶象区域面积点选验证码》
《顶象滑动拼图验证码》
《极验滑动拼图验证码》
《使用深度学习来破解 captcha 验证码》
《验证码终结者-基于CNN+BLSTM+CTC的训练部署套件》

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

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

相关文章

【LeetCode】最接近的三数之和

题目要求 解题思路 这道题解题方法和三数之和解题思路一样&#xff0c;可以参考上一篇博客 代码实现 class Solution { public:int threeSumClosest(vector<int>& nums, int target) {//排序sort(nums.begin(),nums.end());int lennums.size();//固定一个&#x…

流媒体协议RTSP(其二)

欢迎诸位来阅读在下的博文~ 在这里&#xff0c;在下会不定期发表一些浅薄的知识和经验&#xff0c;望诸位能与在下多多交流&#xff0c;共同努力 文章目录 前期博客一、RTSP简介二、请求消息结构三、应答消息结构四、RTSP交互流程 前期博客 流媒体与直播的基础理论&#xff08…

Datawhle X 李宏毅苹果书AI夏令营深度学习笔记之——卷积神经网络的前世今生

一、卷积神经网络简介 卷积神经网络&#xff08;Convolutional Neural Network, CNN&#xff09;是一种深度学习模型&#xff0c;尤其擅长处理图像和视频等高维度的数据。CNN 通过模仿人类视觉系统的工作方式&#xff0c;自动学习数据中的空间层次结构&#xff0c;使得它在计算…

启动第一个docker容器

1 、 docker pull ubuntu:20.04 下载镜像 2、 docker image ls 查看镜像 3、 docker run --nametest -itd 9df6d6105df2 创建并运行一个容器 4、 查看容器 docker ps -a 5、 登录容器 docker exec -it test /bin/bash 6 退出容器 exit 7 删除容器 docker rm 238514292c…

JVM面试真题总结(二)

文章收录在网站&#xff1a;http://hardyfish.top/ 文章收录在网站&#xff1a;http://hardyfish.top/ 文章收录在网站&#xff1a;http://hardyfish.top/ 文章收录在网站&#xff1a;http://hardyfish.top/ volatile关键字能防止指令重排序吗?如何实现? volatile关键字可…

2024国赛数学建模B题完整分析参考论文38页(含模型和可运行代码)

2024 高教社杯全国大学生数学建模完整分析参考论文 B 题 生产过程中的决策问题 目录 摘要 一、问题重述 二、问题分析 三、 模型假设 四、 模型建立与求解 4.1问题1 4.1.1问题1思路分析 4.1.2问题1模型建立 4.1.3问题1样例代码&#xff08;仅供参考&#xff09; 4.…

基于人工智能的图像风格迁移系统

目录 引言项目背景环境准备 硬件要求软件安装与配置系统设计 系统架构关键技术代码示例 数据预处理模型训练模型预测应用场景结论 1. 引言 图像风格迁移是一种计算机视觉技术&#xff0c;它可以将一种图像的风格&#xff08;如梵高的绘画风格&#xff09;迁移到另一幅图像上…

在VMware虚拟机中编译文件的时候报错:找不到头文件ft2build.h

以下是报错内容&#xff0c;提示说找不到头文件ft2build.h freetype_show_font.c:12:10: fatal error: ft2build.h: No such file or directory #include <ft2build.h> ^~~~~~~~~~~~ compilation terminated. 在编译之前已经交叉编译了freetype&#xff0c;…

如何使用 Python 读取 Excel 文件:从零开始的超详细教程

“日出东海落西山 愁也一天 喜也一天 遇事不钻牛角尖” 文章目录 前言文章有误敬请斧正 不胜感恩&#xff01;||Day03为什么要用 Python 读取 Excel 文件&#xff1f;准备工作&#xff1a;安装所需工具安装 Python安装 Pandas安装 openpyxl 使用 Pandas 读取 Excel 文件什么是 …

归并排序-非递归实现

归并排序的非递归实现 我们可以把 一个数组 先拆分成 最小单元&#xff0c;这是分&#xff0c; 拆分成最小单元之后&#xff0c;我们对每个最小单元进行一次合并&#xff0c;这是治 最小单元 合并一次之后&#xff0c;我们继续 在上一次合并的基础上拆分&#xff0c;并且合…

心觉:你为什么没有更多的钱

很多人希望自己可以赚更多的钱 但是他的内心又很讨厌钱&#xff0c;他自己并不知道 一边希望自己赚更多钱&#xff0c;一边在骨子里觉得“金钱是万恶之源” 这是一种神经质的错乱 这种现象在什么情况下会表现得比较明显呢&#xff1f; 某位高官因为贪污受贿落马了&#xf…

Cesium坐标系

针对作坐标系这边参考网上以及自己的一些理解大家可以参考学习一下。 文章目录 **一、GIS 坐标系****二、经纬度坐标&#xff08;球面坐标&#xff09;****三、地理坐标&#xff08;弧度&#xff09;****四、屏幕坐标系****五、空间直角坐标系****六、Cesium 中的坐标系****七、…

【C++模版初阶】——我与C++的不解之缘(七)

一、泛型编程 在之前&#xff0c;我们想要实现一个交换两个值的函数&#xff0c;我们要实现好多个&#xff08;int类型、double类型、char类型以及自定义类型&#xff09;对于每一个类型&#xff0c;我们都需要实现一个交换函数&#xff1a; int Swap(int& x, int& y)…

【Qt】仿照qq界面的设计

widget.h #ifndef WIDGET_H #define WIDGET_H#include <QWidget> #include <QDebug>//QT中信息调试类&#xff0c;用于输出数据&#xff0c;无需使用该类的实例化对象&#xff0c;直接使用成员函数即可 #include <QIcon>//图标类 #include <QPushButton&…

【笔记】数据结构刷题09

快速排序 215. 数组中的第K个最大元素 class Solution { public:int findKthLargest(vector<int>& nums, int k) {return divide(nums,0,nums.size()-1,nums.size()-k);}int divide(vector<int>& nums,int left,int right,int k){if(leftright)return nums…

Linux 如何将pwd的结果同步复制到剪贴板

pwd是我们经常使用的一个命令&#xff0c;它的作用是显示当前所在路径。 不过&#xff0c;很多时候我们使用pwd命令不仅仅是查看当前路径&#xff0c;而是复制路径。 通常情况下&#xff0c;使用pwd命令进行复制路径的操作如下&#xff1a; 使用pwd显示路径&#xff08;键盘…

计算机毕业设计选题推荐-健康健身追踪系统-运动健身系统-Java/Python项目实战

✨作者主页&#xff1a;IT毕设梦工厂✨ 个人简介&#xff1a;曾从事计算机专业培训教学&#xff0c;擅长Java、Python、微信小程序、Golang、安卓Android等项目实战。接项目定制开发、代码讲解、答辩教学、文档编写、降重等。 ☑文末获取源码☑ 精彩专栏推荐⬇⬇⬇ Java项目 Py…

00Mac安装playwright

文章目录 前言一、执行以下命令安装二、安装如果报错zsh: command not found: pip三、安装浏览器驱动 前言 现在常用的三个自动化测试&#xff08;或者爬虫&#xff09;库&#xff0c;是Selenium、Puppeteer、Playwright。Playwright是未来趋势&#xff0c;主要学习Playwright…

资料分析笔记(花生)

preparation 资料分析首先最重要的是时间/时间段分小互换 一、速算技巧 加法技巧 1.尾数法 在多个数字精确求和或求差时&#xff0c;从“尾数”入手&#xff0c;为保证精确与速度&#xff0c;一般可观察两位。 求和题目中&#xff0c;若四个选项中后两位都不同&#xff0c;…

小琳Python课堂:深入理解Python对象:状态、创建与管理

大家好&#xff0c;这里是小琳Python课堂。今天我们继续深入理解Python对象的状态、创建与管理。让我们一起来探索这些概念&#xff0c;以帮助你更好地掌握Python编程。 一、Python对象的状态 1. 实例属性与类属性 Python对象的属性分为实例属性和类属性。实例属性是对象独有…